org.apache.axis2.AxisFault: “The input stream for an incoming message is null” getting Exception while registering Service Provider App on WSO2 IS
I am using WSO2 IS v5.1.0. and trying to create a Service Provider Application.
I tried all posted network asked question solution, but still getting the same Exception.
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
And when trying to create/register the same application name then throwing the following Exception:
org.apache.axis2.AxisFault: Error while creating application role: Application/ServiceProviderAppTest with user admin
Testing code for the Service Provide application:
package com.customserviceprovider;
import java.rmi.RemoteException;
import org.apache.axis2.Constants;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig;
import org.wso2.carbon.identity.application.common.model.xsd.Property;
import org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider;
import org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceException;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceStub;
import org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerAppDTO;
public class IdentityClient
private final static String SERVER_URL = "https://localhost:9443/services/";
public static void main(String args) throws RemoteException, OAuthAdminServiceException
String appName = "ServiceProviderAppTest";
String appDescription = "Test description for ServiceProviderAppTest";
System.setProperty("javax.net.ssl.trustStore", "D:\wso2carbon.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
try
IdentityApplicationManagementServiceStub IAMStub = new IdentityApplicationManagementServiceStub(
null, SERVER_URL + "IdentityApplicationManagementService");
ServiceClient IAMClient = IAMStub._getServiceClient();
authenticate(IAMClient);
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(appName);
serviceProvider.setDescription(appDescription);
IAMStub.createApplication(serviceProvider);//throwing Exception
catch (Exception e)
e.printStackTrace();
public static void authenticate(ServiceClient client)
Options option = client.getOptions();
option.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_APPLICATION_ECHO_XML);
option.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setUsername("admin");
auth.setPassword("admin");
auth.setPreemptiveAuthentication(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
option.setManageSession(true);
Even though with Exception Application is creating on Server.
Any help to solve the exception incoming message is null.
java wso2 axis2 wso2is
add a comment |
I am using WSO2 IS v5.1.0. and trying to create a Service Provider Application.
I tried all posted network asked question solution, but still getting the same Exception.
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
And when trying to create/register the same application name then throwing the following Exception:
org.apache.axis2.AxisFault: Error while creating application role: Application/ServiceProviderAppTest with user admin
Testing code for the Service Provide application:
package com.customserviceprovider;
import java.rmi.RemoteException;
import org.apache.axis2.Constants;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig;
import org.wso2.carbon.identity.application.common.model.xsd.Property;
import org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider;
import org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceException;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceStub;
import org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerAppDTO;
public class IdentityClient
private final static String SERVER_URL = "https://localhost:9443/services/";
public static void main(String args) throws RemoteException, OAuthAdminServiceException
String appName = "ServiceProviderAppTest";
String appDescription = "Test description for ServiceProviderAppTest";
System.setProperty("javax.net.ssl.trustStore", "D:\wso2carbon.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
try
IdentityApplicationManagementServiceStub IAMStub = new IdentityApplicationManagementServiceStub(
null, SERVER_URL + "IdentityApplicationManagementService");
ServiceClient IAMClient = IAMStub._getServiceClient();
authenticate(IAMClient);
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(appName);
serviceProvider.setDescription(appDescription);
IAMStub.createApplication(serviceProvider);//throwing Exception
catch (Exception e)
e.printStackTrace();
public static void authenticate(ServiceClient client)
Options option = client.getOptions();
option.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_APPLICATION_ECHO_XML);
option.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setUsername("admin");
auth.setPassword("admin");
auth.setPreemptiveAuthentication(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
option.setManageSession(true);
Even though with Exception Application is creating on Server.
Any help to solve the exception incoming message is null.
java wso2 axis2 wso2is
Any error you see in the Identity Server backend logs? And any reason to set Constants.Configuration.MESSAGE_TYPE and Constants.Configuration.DISABLE_SOAP_ACTION in the service client?
– Maduranga Siriwardena
Nov 23 '18 at 7:43
add a comment |
I am using WSO2 IS v5.1.0. and trying to create a Service Provider Application.
I tried all posted network asked question solution, but still getting the same Exception.
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
And when trying to create/register the same application name then throwing the following Exception:
org.apache.axis2.AxisFault: Error while creating application role: Application/ServiceProviderAppTest with user admin
Testing code for the Service Provide application:
package com.customserviceprovider;
import java.rmi.RemoteException;
import org.apache.axis2.Constants;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig;
import org.wso2.carbon.identity.application.common.model.xsd.Property;
import org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider;
import org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceException;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceStub;
import org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerAppDTO;
public class IdentityClient
private final static String SERVER_URL = "https://localhost:9443/services/";
public static void main(String args) throws RemoteException, OAuthAdminServiceException
String appName = "ServiceProviderAppTest";
String appDescription = "Test description for ServiceProviderAppTest";
System.setProperty("javax.net.ssl.trustStore", "D:\wso2carbon.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
try
IdentityApplicationManagementServiceStub IAMStub = new IdentityApplicationManagementServiceStub(
null, SERVER_URL + "IdentityApplicationManagementService");
ServiceClient IAMClient = IAMStub._getServiceClient();
authenticate(IAMClient);
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(appName);
serviceProvider.setDescription(appDescription);
IAMStub.createApplication(serviceProvider);//throwing Exception
catch (Exception e)
e.printStackTrace();
public static void authenticate(ServiceClient client)
Options option = client.getOptions();
option.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_APPLICATION_ECHO_XML);
option.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setUsername("admin");
auth.setPassword("admin");
auth.setPreemptiveAuthentication(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
option.setManageSession(true);
Even though with Exception Application is creating on Server.
Any help to solve the exception incoming message is null.
java wso2 axis2 wso2is
I am using WSO2 IS v5.1.0. and trying to create a Service Provider Application.
I tried all posted network asked question solution, but still getting the same Exception.
org.apache.axis2.AxisFault: The input stream for an incoming message is null.
And when trying to create/register the same application name then throwing the following Exception:
org.apache.axis2.AxisFault: Error while creating application role: Application/ServiceProviderAppTest with user admin
Testing code for the Service Provide application:
package com.customserviceprovider;
import java.rmi.RemoteException;
import org.apache.axis2.Constants;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig;
import org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig;
import org.wso2.carbon.identity.application.common.model.xsd.Property;
import org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider;
import org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceException;
import org.wso2.carbon.identity.oauth.stub.OAuthAdminServiceStub;
import org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerAppDTO;
public class IdentityClient
private final static String SERVER_URL = "https://localhost:9443/services/";
public static void main(String args) throws RemoteException, OAuthAdminServiceException
String appName = "ServiceProviderAppTest";
String appDescription = "Test description for ServiceProviderAppTest";
System.setProperty("javax.net.ssl.trustStore", "D:\wso2carbon.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
try
IdentityApplicationManagementServiceStub IAMStub = new IdentityApplicationManagementServiceStub(
null, SERVER_URL + "IdentityApplicationManagementService");
ServiceClient IAMClient = IAMStub._getServiceClient();
authenticate(IAMClient);
ServiceProvider serviceProvider = new ServiceProvider();
serviceProvider.setApplicationName(appName);
serviceProvider.setDescription(appDescription);
IAMStub.createApplication(serviceProvider);//throwing Exception
catch (Exception e)
e.printStackTrace();
public static void authenticate(ServiceClient client)
Options option = client.getOptions();
option.setProperty(Constants.Configuration.MESSAGE_TYPE,HTTPConstants.MEDIA_TYPE_APPLICATION_ECHO_XML);
option.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,Boolean.TRUE);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setUsername("admin");
auth.setPassword("admin");
auth.setPreemptiveAuthentication(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
option.setManageSession(true);
Even though with Exception Application is creating on Server.
Any help to solve the exception incoming message is null.
java wso2 axis2 wso2is
java wso2 axis2 wso2is
asked Nov 14 '18 at 16:46
r08r08
206
206
Any error you see in the Identity Server backend logs? And any reason to set Constants.Configuration.MESSAGE_TYPE and Constants.Configuration.DISABLE_SOAP_ACTION in the service client?
– Maduranga Siriwardena
Nov 23 '18 at 7:43
add a comment |
Any error you see in the Identity Server backend logs? And any reason to set Constants.Configuration.MESSAGE_TYPE and Constants.Configuration.DISABLE_SOAP_ACTION in the service client?
– Maduranga Siriwardena
Nov 23 '18 at 7:43
Any error you see in the Identity Server backend logs? And any reason to set Constants.Configuration.MESSAGE_TYPE and Constants.Configuration.DISABLE_SOAP_ACTION in the service client?
– Maduranga Siriwardena
Nov 23 '18 at 7:43
Any error you see in the Identity Server backend logs? And any reason to set Constants.Configuration.MESSAGE_TYPE and Constants.Configuration.DISABLE_SOAP_ACTION in the service client?
– Maduranga Siriwardena
Nov 23 '18 at 7:43
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53305061%2forg-apache-axis2-axisfault-the-input-stream-for-an-incoming-message-is-null-g%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53305061%2forg-apache-axis2-axisfault-the-input-stream-for-an-incoming-message-is-null-g%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Any error you see in the Identity Server backend logs? And any reason to set Constants.Configuration.MESSAGE_TYPE and Constants.Configuration.DISABLE_SOAP_ACTION in the service client?
– Maduranga Siriwardena
Nov 23 '18 at 7:43