Hi Maninda,
You have to initiate the test as tenant. Then it will append the tenant
name to the service URL.

super.init(TestUserMode.TENANT_ADMIN)

Thanks,
Nuwanw

On Mon, Apr 27, 2015 at 6:48 AM, Maninda Edirisooriya <[email protected]>
wrote:

> Hi Krishantha,
>
> I have tried to invoke secure (user name + token) proxy like below.
>
>
>
>         SecureAxisServiceClient secureClient = new
> SecureAxisServiceClient();
>
>         String keyStorePath =
> ProductConstant.SYSTEM_TEST_RESOURCE_LOCATION + File.separator + "security"
>                 + File.separator + "keystore" + File.separator +
> "client.jks";
>         String userCertAlias = "client";
>         String encryptionUser = "service";
>         String keyStorePassword = "automation";
>
>         String response = "";
>         String policyPath = ProductConstant.getSystemResourceLocation() +
>                 "/security/policies/UTOverTransport.xml";
>         OMElement payload = AXIOMUtil.stringToOM("<echo:echoInt
> xmlns:echo=\"http://echo.services.core.carbon.wso2.org\";>        \n" +
>                 "         <in>5</in>\n" +
>                 "      </echo:echoInt>");
>         String trpUrl = esbServer.getSecureServiceUrl() + "/" +
> "EchoProxyService";
>
>
>         try {
>             response = secureClient.sendReceive("[email protected]",
> "admin123", trpUrl, "POST", payload, policyPath,
>                     userCertAlias, encryptionUser, keyStorePath,
> keyStorePassword).toString();
>
>         } catch (AxisFault e) {
>             log.error(e);
>         }
>
> But it was not invoking the ESB proxy correctly and raises the following
> error.
>
>
> [2015-04-27 18:23:37,093]  INFO
> {org.apache.axis2.deployment.DeploymentEngine} -  No services directory was
> found under
> /home/maninda/private/turing/platform/trunk/products/esb/4.8.1/modules/integration/tests-patches/src/test/resources/client.
> [2015-04-27 18:23:37,093]  INFO
> {org.apache.axis2.deployment.DeploymentEngine} -  No services directory was
> found under
> /home/maninda/private/turing/platform/trunk/products/esb/4.8.1/modules/integration/tests-patches/src/test/resources/client.
> [2015-04-27 18:23:37,642]  INFO
> {org.wso2.carbon.automation.utils.axis2client.SecureAxisServiceClient} -
> Endpoint reference :https://localhost:8243/services/EchoProxyService
> [2015-04-27 18:23:45,851]  INFO
> {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler} -
> [2015-04-27 18:23:45,851]  INFO - LogMediator To:
> https://localhost:8243/services/EchoProxyService, WSAction: urn:POST,
> SOAPAction: urn:POST, ReplyTo:
> http://www.w3.org/2005/08/addressing/anonymous, MessageID:
> urn:uuid:3949a5ac-5ebf-48b8-be4c-86e41df96a2d, Direction: request,
> Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header
> xmlns:wsa="http://www.w3.org/2005/08/addressing";><wsse:Security
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> soapenv:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="Timestamp-1"><wsu:Created>2015-04-27T12:53:39.959Z</wsu:Created><wsu:Expires>2015-04-27T12:58:39.959Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="UsernameToken-2"><wsse:Username>[email protected]</wsse:Username><wsse:Password
> Type="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText
> ">admin123</wsse:Password></wsse:UsernameToken></wsse:Security><wsa:To>
> https://localhost:8243/services/EchoProxyService</wsa:To><wsa:MessageID>urn:uuid:3949a5ac-5ebf-48b8-be4c-86e41df96a2d</wsa:MessageID><wsa:Action>urn:POST</wsa:Action></soapenv:Header><soapenv:Body><echo:echoInt
> xmlns:echo="http://echo.services.core.carbon.wso2.org";>
> [2015-04-27 18:23:45,851]  INFO
> {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler}
> -           <in>5</in>
> [2015-04-27 18:23:45,852]  INFO
> {org.wso2.carbon.automation.core.utils.coreutils.InputStreamHandler}
> -        </echo:echoInt></soapenv:Body></soapenv:Envelope>
> [2015-04-27 18:23:46,042] ERROR
> {org.wso2.carbon.automation.utils.axis2client.SecureAxisServiceClient} -
> AxisFault : The input stream for an incoming message is null.
> [2015-04-27 18:24:12,808] ERROR
> {org.wso2.carbon.esb.message.tracing.BAM1904MessageTracingTest} -
> org.apache.axis2.AxisFault: The input stream for an incoming message is
> null.
>
> What may be the cause?
>
> Thanks.
>
> *Maninda Edirisooriya*
> Senior Software Engineer
>
> *WSO2, Inc.*lean.enterprise.middleware.
>
> *Blog* : http://maninda.blogspot.com/
> *E-mail* : [email protected]
> *Skype* : @manindae
> *Twitter* : @maninda
>



-- 
Nuwan Wimalasekara
Senior Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

phone: +94 71 668 4620
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to