[Users] Error invoking external web service
pierrot
pierre.bernadou at mythalesgroup.com
Wed Mar 16 10:39:50 CET 2011
Hello all,
I'm still working on my problem and I've tried a new approach, as I suppose my bpel service is ok. Right now, I just want to invoke a basic web service, the getVersion axis2 service. So I can suppose I don't have any wsdl or service implementation problem.
I created a su-SOAP-Version-provide based on following wsdl:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://axisversion.sample" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://axisversion.sample" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
<wsdl:documentation>Version</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axisversion.sample">
<xs:complexType name="Exception">
<xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Exception">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="ns:Exception"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getVersionResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getVersionRequest">
</wsdl:message>
<wsdl:message name="getVersionResponse">
<wsdl:part name="parameters" element="ns:getVersionResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="Exception">
<wsdl:part name="parameters" element="ns:Exception">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="VersionPortType">
<wsdl:operation name="getVersion">
<wsdl:input message="ns:getVersionRequest" wsaw:Action="urn:getVersion">
</wsdl:input>
<wsdl:output message="ns:getVersionResponse" wsaw:Action="urn:getVersionResponse">
</wsdl:output>
<wsdl:fault name="Exception" message="ns:Exception" wsaw:Action="urn:getVersionException">
</wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="VersionSoap11Binding" type="ns:VersionPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getVersion">
<soap:operation soapAction="urn:getVersion" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Version">
<wsdl:port name="VersionHttpSoap11Endpoint" binding="ns:VersionSoap11Binding">
<soap:address location="http://192.168.9.102:8080/axis2/services/Version.VersionHttpSoap11Endpoint/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
and jbi.xml is the following:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBI descriptor for the Petals' "petals-bc-soap" component (SOAP).
Originally created for the version 4.0 of the component.
-->
<jbi:jbi version="1.0"
xmlns:generatedNs="http://axisversion.sample"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:soap="http://petals.ow2.org/components/soap/version-4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- Import a Service into Petals or Expose a Petals Service => use a BC. -->
<jbi:services binding-component="true">
<!-- Import a Service into Petals => provides a Service. -->
<jbi:provides
interface-name="generatedNs:VersionPortType"
service-name="generatedNs:Version"
endpoint-name="VersionHttpSoap11Endpoint">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>true</petalsCDK:validate-wsdl>
<petalsCDK:forward-security-subject>false</petalsCDK:forward-security-subject>
<petalsCDK:forward-message-properties>false</petalsCDK:forward-message-properties>
<petalsCDK:forward-attachments>false</petalsCDK:forward-attachments>
<petalsCDK:wsdl>version.wsdl</petalsCDK:wsdl>
<!-- Component specific elements -->
<soap:address>http://192.168.9.102:8080/axis2/services/Version.VersionHttpSoap11Endpoint/</soap:address>
<soap:soap-version>1.1</soap:soap-version>
<soap:add-root>false</soap:add-root>
<soap:chunked-mode>false</soap:chunked-mode>
<soap:cleanup-transport>true</soap:cleanup-transport>
<soap:mode>SOAP</soap:mode>
</jbi:provides>
</jbi:services>
</jbi:jbi>
as it was generated by Petals Studio
I deployed the sa and invokes the component using petals web console test form with the following request:
Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body/>
</soapenv:Envelope>
which is the same I use for soapui invokation (could it be the problem?).
The petals web console test form gives me this response:
Code:
Last sent:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body/>
</soapenv:Envelope>
Returned content:
BC-SOAP Error => org.apache.axis2.AxisFault: The server did not recognise the action which it received:
javax.jbi.messaging.MessagingException: BC-SOAP Error => org.apache.axis2.AxisFault: The server did not recognise the action which it received: at org.ow2.petals.binding.soap.listener.outgoing.AbstractExternalServiceCaller.handleException(AbstractExternalServiceCaller.java:137) at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.handleSOAPFault(SOAPCaller.java:491) at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.call(SOAPCaller.java:265) at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.invokeCaller(JBIListener.java:158) at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.onJBIMessage(JBIListener.java:118) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:628) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:379) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:242) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:176) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
The trace I have on the service tomcat is the following:
Code:
[WARN] triggerActionNotSupportedFault: messageContext: [MessageContext: logID=urn:uuid:95C2BAE73C883B790A1267031189220] problemAction: urn:getVersionResponse
[ERROR] The [action] cannot be processed at the receiver.
org.apache.axis2.AxisFault: The [action] cannot be processed at the receiver.
at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:373)
at org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionNotSupportedFault(AddressingFaultsHelper.java:336)
at org.apache.axis2.handlers.addressing.AddressingValidationHandler.checkAction(AddressingValidationHandler.java:149)
at org.apache.axis2.handlers.addressing.AddressingValidationHandler.invoke(AddressingValidationHandler.java:55)
at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
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:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
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:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
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:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
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:689)
at java.lang.Thread.run(Thread.java:619)
It seems the action urn:getVersionResponse is not supported, but everything is ok using soapui. Maybe invokation mecanism is not the same. I don't understand why the problem is on the response action (because it is not defined as soapAction into the wsdl?)
I can imagine also my service deployment/testing process is not the good one. If yes, could somebody show me the right way?
Thanks!
-------------------- m2f --------------------
Subscribe/Unsubscribe emails notifications.
Response to this email will be posted on the Petals forum.
Please delete the existing text before responding :)
Read the topic online:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=30486#30486
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/c79d7019/attachment.htm>
More information about the Users
mailing list