[Users] Error invoking external web service

pierrot pierre.bernadou at mythalesgroup.com
Wed Mar 16 10:39:52 CET 2011


Hello all,

A new step, I successed in invoking the getVersion axis2 service. But the solution doesn't satisfy me.
In fact, I provided a service wsdl, setting useOriginalwsdl to true into services.xml.
This is the new 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="VersionSoap12Binding" type="ns:VersionPortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="getVersion">
            <soap12:operation soapAction="urn:getVersionResponse" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="Exception">
                <soap12:fault use="literal" name="Exception"/>
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
  <wsdl:service name="Version">
    <wsdl:port name="VersionHttpSoap12Endpoint" binding="ns:VersionSoap12Binding">
      <soap:address location="http://localhost:8080/axis2/services/Version.VersionHttpSoap12Endpoint/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


I changed it in order to force the use of soap12 endpoint, but it didn't fix my problem. The second change is the setting of 'soapAction="urn:getVersion"' to 'soapAction="urn:getVersionResponse"' for the '<wsdl:operation name="getVersion">' element. I have tried this because during my previous tests, it seemed to me the soapAction sent was always the operation name concatenated with 'Response'. The service is invoked now, but finally, I don't understand what's wrong with my process. Any idea?

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=30491#30491

-------------------- m2f --------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/f7829a70/attachment.htm>


More information about the Users mailing list