0
votes

I have a java-based web service built with Axis2. The WSDL was generated by the Eclipse 3.6 wizard.

I have a Flex 4 client built using introspection via the WSDL in Flash Builder 4.

For calls where the method takes a 'simple' type like String or int, it all seems OK, but for calls where the parameter is (on the Java side) and OMElement, ie XML data, I'm setting the following runtime error on the service:

org.apache.axis2.engine.AxisEngine  - namespace mismatch require http://server.rsc.geo.othermaps.com found none

http://server.rsc.geo.othermaps.com is indeed the target namespace declared in the WSDL.

The same workflow (use autogenerated client built from web service introspection) worked fine against the same service in Flex 3, so I'm not sure where to start hunting. So I really need to manually add the namespace to the XML data I'm submitting?

D

2

2 Answers

0
votes

If your XML that's coming back doesn't have the namespace declaration at the top, I would definitely add it.

0
votes

You are trying to consume a SOAP Web Service created by Axis2.

Make sure that your SOAP enveloppe request namespace exactly matches the wsdl namespace :

Let's say your namespace name is : yourNamespace

Your HTTP POST request should look like this :

<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:v2="yourNamespace">
  <soap:Body>
   <v2:yourActionName>
    <v2:yourFirstParameter>yourFirstParameterValue</v2:yourFirstParameter>
    <v2:yourSecondParameter>yourSecondParameterValue</v2:yourSecondParameter>
   </v2:yourActionName>
  </soap:Body>
</soap:Envelope>

and the WSDL should start with :

<wsdl:definitions targetNamespace="yourNamespace">
 <wsdl:documentation>yourWebServiceProjectNameHere</wsdl:documentation>
   <wsdl:types>
     <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="yourNamespace">