954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problems creating a Web Service Implementation

Hi, I am developing a small Web Service that should send and retreive a String.

To do this I wrote the wsdl file below:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
				  xmlns:tns="http://itautec.com.br/Sagem/WebService/Impl" 
				  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
				  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
				  name="SagemWebService" 
				  targetNamespace="http://itautec.com.br/Sagem/WebService/Impl">
  
  <wsdl:message name="WS_IdentifyRequest">
    <wsdl:part name="parameters" element="xsd:string"/>
  </wsdl:message>
  <wsdl:message name="WS_IdentifyResponse">
    <wsdl:part name="parameters" element="xsd:string"/>
  </wsdl:message>
  
  <wsdl:portType name="SagemWebService">
    <wsdl:operation name="WS_Identify">
      <wsdl:input message="tns:WS_IdentifyRequest"/>
      <wsdl:output message="tns:WS_IdentifyResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  
  <wsdl:binding name="SagemWebServiceSOAP" type="tns:SagemWebService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="WS_Identify">
      <soap:operation soapAction="http://itautec.com.br/SagemWebService/WS_Identify"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  
  <wsdl:service name="SagemWebService">
    <wsdl:port binding="tns:SagemWebServiceSOAP" name="SagemWebServiceSOAP">
      <soap:address location="http://itautec.com.br/"/>
    </wsdl:port>
  </wsdl:service>
  
</wsdl:definitions>


However when I try to generate its implementation for the server side using Eclipse Galileo and Axis2 I get those errors at my message receiver class:

org.apache.axiom.om.OMElement.MY_QNAME cannot be resolved	SagemWebServiceMessageReceiverInOut.java

Cannot instantiate the type OMElement	SagemWebServiceMessageReceiverInOut.java


The automatically generated code for the Web Service that has those errors is (please note that the errors are in lines: 8 and 21 respectively):

private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, org.apache.axiom.om.OMElement param, boolean optimizeContent) throws org.apache.axis2.AxisFault
                    {
                      try
                      {
                          org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
                           
                          emptyEnvelope.getBody().addChild(param.getOMElement(org.apache.axiom.om.OMElement.MY_QNAME,factory));
                          
                         return emptyEnvelope;
                         
                      } 
                      catch(org.apache.axis2.databinding.ADBException e)
                      {
                        throw org.apache.axis2.AxisFault.makeFault(e);
                      }
                    } 
                    
                    private org.apache.axiom.om.OMElement wrapWS_Identify()
                    {
                      org.apache.axiom.om.OMElement wrappedElement = new org.apache.axiom.om.OMElement();
                      return wrappedElement;
                    }


Please help me! What am I doing wrong?

Thanks,
Komyg

komyg
Light Poster
29 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You