Hi, we tried to set up the BS of WSO2 version to test the interoperability
with OPS of different versions, but I got the errors as shown in subject.
Here is what we did:
1. According to the installation guide, we got the stonehenge of PHP version
running, which means we could log in the stocktrader and place order
successfully from the PHP client and PHP BS/OPS via basicHttpBinding.
note: we need to set the config_service url to =>
http://localhost:8080/php_stocktrader/config_service/config_svc.php, because
by default the config_service is under the php_stocktrader directory.

2. We built the wsas BS code from the branch M1 locally, adding some
dependent libraries. And then deployed the packaged .aar to the WSAS server.
We can check the wsdl file by url with suffix '?wsdl', such as
http://localhost:9763/service/TradeServiceWsas?wsdl

3. We tried to use the above config_service url in BS of WSO2 version, but
we failed because the WSO2 version BS uses
http://localhost:8080/config_service/config_svc.php in a lot of places. In
that case, we moved the config_service and required 'resources' out of the
'php_stocktrader', so that we can access it with
http://localhost:8080/config_service/config_svc.php. This url worked to
stocktrader of PHP version.

4. After changing the value in database, we used the PHP client, both BS and
OPS of the WSO2 version to try the interoperability. But we got the
following errors:
//////////////
[2009-06-08 16:39:43,609] ERROR -  org.apache.axis2.AxisFault:
org.apache.axis2.databinding.ADBException: Unexpected subelement
BSConfigResponse {org.apache.axis2.engine.AxisEngine}
org.apache.axis2.AxisFault: org.apache.axis2.AxisFault:
org.apache.axis2.databinding.ADBException: Unexpected subelement
BSConfigResponse
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.tempuri.TradeServiceWcfMessageReceiverInOut.invokeBusinessLogic(TradeServiceWcfMessageReceiverInOut.java:369)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault:
org.apache.axis2.databinding.ADBException: Unexpected subelement
BSConfigResponse
at
org.wso2.stocktrader.services.TraderServiceManager.placeOrder(TraderServiceManager.java:169)
at
org.wso2.stocktrader.services.TraderServiceManager.buy(TraderServiceManager.java:132)
at
org.wso2.stocktrader.services.TradeServiceImpl.buy(TradeServiceImpl.java:80)
at
org.tempuri.TradeServiceWcfMessageReceiverInOut.invokeBusinessLogic(TradeServiceWcfMessageReceiverInOut.java:172)
... 27 more
Caused by: org.apache.axis2.AxisFault:
org.apache.axis2.databinding.ADBException: Unexpected subelement
BSConfigResponse
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.wso2.interop.stocktrader.Config_svcStub.fromOM(Config_svcStub.java:3440)
at
org.wso2.interop.stocktrader.Config_svcStub.bSConfigRequest(Config_svcStub.java:351)
at
org.wso2.stocktrader.services.TradeConfigServiceClient.getTradeOrderConfig(TradeConfigServiceClient.java:62)
at
org.wso2.stocktrader.services.TradeOrderServiceClient.geTradeOrderConfig(TradeOrderServiceClient.java:79)
at
org.wso2.stocktrader.services.TradeOrderServiceClient.SubmitOrderTrasactedQueue(TradeOrderServiceClient.java:63)
at
org.wso2.stocktrader.services.TraderServiceManager.placeOrder(TraderServiceManager.java:160)
... 30 more
Caused by: java.lang.Exception: org.apache.axis2.databinding.ADBException:
Unexpected subelement BSConfigResponse
at
org.wso2.interop.stocktrader.xsd.BSConfigResponseE$Factory.parse(BSConfigResponseE.java:366)
at
org.wso2.interop.stocktrader.Config_svcStub.fromOM(Config_svcStub.java:3301)
... 35 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement
BSConfigResponse
at
org.wso2.interop.stocktrader.xsd.BSConfigResponseE$Factory.parse(BSConfigResponseE.java:354)
... 36 more
//////////////////

5. We used Http_Debugger_Pro to catch the HTTP packages, and found that the
config_service did response the client correct soap messages.

6. We commented out the relevant code in BS source and hard coded the
OPS_url in the code, then everything was OK.

That's all, It seemed like that the Config_svcStub used the ADB pattern, but
couldn't parse the response from the config_service in PHP correctly.

Does anyone have any suggestion?

Thanks.

--------
Ming Jin

Consultant
Thoughtworks, Inc

Reply via email to