You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Arpan R (JIRA)" <ji...@apache.org> on 2011/08/10 11:09:27 UTC

[jira] [Created] (AXIS2-5116) AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat

AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat
--------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-5116
                 URL: https://issues.apache.org/jira/browse/AXIS2-5116
             Project: Axis2
          Issue Type: Bug
          Components: deployment
    Affects Versions: 1.5.5
         Environment: Tomcat , Windows, Java 6,Axis 2.15
            Reporter: Arpan R
            Priority: Blocker


Hi,
 we were previously using the webservice AXIS-1.
 And it was deployed in tomcat server at location (http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService).

Now I am tryin to upgrade it to AXIS-2.

I have written the WSDL , Generated the skeleton, Stubs. Added business logic in the skeleton.
I created the aar file put it in the AXIS2_Home/services/repository... and it works fine.
I tested the above scenario on my local machine and with AXIS-2 server.


Now the same I am trying to do on the remote machine.
I have changed the stub files to point it to http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService.In the constructor of the stub.

After uploading the webservice to the tomcat if i hit the http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService I see the page which tells 

SOPostWebService
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...

Now i trying to invoke the webservice from my code using stub but it fails on the                 _operationClient.execute(true); call in the stub.

Stack trace is here :

Caused by: org.apache.axis2.AxisFault: string
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at com.url.pkg.BasicServiceStub.showInput(BasicServiceStub.java:184)
    at com.url.pkg.Client.main(Client.java:30)


Skeleton Code :

public com.url.pkg.ShowInputResponse showInput(
        com.url.pkg.ShowInput showInput) {
    // TODO : fill this with the necessary business logic
    String inputString = showInput.getInputString();
    System.out.println("INput String is :\n" + inputString);
    XStream xStream = new XStream();
    System.out.println("After XStream Declaration...");
    SOVO vo = null;
    try {
        vo = (SOVO) xStream.fromXML(inputString);
    } catch (Throwable e) {
        System.out.println(e);
        e.printStackTrace();
    }
    System.out.println("After SOVO casting from XML");
    System.out.println(vo.getName());
    System.out.println(vo.getParams());
    // TODO: business logic
    ShowInputResponse response = new ShowInputResponse();
    response.set_return(inputString);
    return response;
}

public class SOVO {

    private String name;
    private Map params;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Map getParams() {
        return params;
    }

    public void setParams(Map params) {
        this.params = params;
    }

}


WSDL file code:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://pkg.url.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://pkg.url.com">
    <wsdl:types>
        <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pkg.url.com">
            <xs:element name="showInput">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="inputString" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="showInputResponse">
                <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="showInputRequest">
        <wsdl:part name="parameters" element="ns:showInput"/>
    </wsdl:message>
    <wsdl:message name="showInputResponse">
        <wsdl:part name="parameters" element="ns:showInputResponse"/>
    </wsdl:message>
    <wsdl:portType name="BasicServicePortType">
        <wsdl:operation name="showInput">
            <wsdl:input message="ns:showInputRequest" wsaw:Action="urn:showInput"/>
            <wsdl:output message="ns:showInputResponse" wsaw:Action="urn:showInputResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="BasicServiceSoap11Binding" type="ns:BasicServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="showInput">
            <soap:operation soapAction="urn:showInput" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="BasicServiceSoap12Binding" type="ns:BasicServicePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="showInput">
            <soap12:operation soapAction="urn:showInput" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="BasicServiceHttpBinding" type="ns:BasicServicePortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="showInput">
            <http:operation location="BasicService/showInput"/>
            <wsdl:input>
                <mime:content type="text/xml" part="showInput"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="showInput"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="BasicService">
        <wsdl:port name="BasicServiceHttpSoap11Endpoint" binding="ns:BasicServiceSoap11Binding">
            <soap:address location="http://localhost:8080/axis2/services/BasicService"/>
        </wsdl:port>
        <wsdl:port name="BasicServiceHttpSoap12Endpoint" binding="ns:BasicServiceSoap12Binding">
            <soap12:address location="http://localhost:8080/axis2/services/BasicService"/>
        </wsdl:port>
        <wsdl:port name="BasicServiceHttpEndpoint" binding="ns:BasicServiceHttpBinding">
            <http:address location="http://localhost:8080/axis2/services/BasicService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


Client Code:

public static void main(String[] args) throws Exception {
        BasicServiceStub stub = new BasicServiceStub();
        ShowInput request = new ShowInput();
        SOVO sovo = new SOVO();
        sovo.setName("I am the post for SO");
        Map params = new HashMap();
        params.put("key1", "val1");
        params.put("key2", "val2");
        sovo.setParams(params);
        XStream xStream = new XStream();
        String soVoString = xStream.toXML(sovo);
        // System.out.println(soVoString);
        request.setInputString(soVoString);
        ShowInputResponse response = stub.showInput(request);
        System.out.println("....................................");
        System.out.println("response = " + response.get_return());
    }




Can any one suggest what might be the issue and work around?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Resolved] (AXIS2-5116) AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat

Posted by "Sagara Gunathunga (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sagara Gunathunga  resolved AXIS2-5116.
---------------------------------------

    Resolution: Incomplete

Mark it as resolved. 
                
> AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5116
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5116
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.5.5
>         Environment: Tomcat , Windows, Java 6,Axis 2.15
>            Reporter: Arpan R
>              Labels: axis2, tomcat
>
> Hi,
>  we were previously using the webservice AXIS-1.
>  And it was deployed in tomcat server at location (http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService).
> Now I am tryin to upgrade it to AXIS-2.
> I have written the WSDL , Generated the skeleton, Stubs. Added business logic in the skeleton.
> I created the aar file put it in the AXIS2_Home/services/repository... and it works fine.
> I tested the above scenario on my local machine and with AXIS-2 server.
> Now the same I am trying to do on the remote machine.
> I have changed the stub files to point it to http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService.In the constructor of the stub.
> After uploading the webservice to the tomcat if i hit the http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService I see the page which tells 
> SOPostWebService
> Hi there, this is an AXIS service!
> Perhaps there will be a form for invoking the service here...
> Now i trying to invoke the webservice from my code using stub but it fails on the                 _operationClient.execute(true); call in the stub.
> Stack trace is here :
> Caused by: org.apache.axis2.AxisFault: string
>     at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
>     at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
>     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
>     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>     at com.url.pkg.BasicServiceStub.showInput(BasicServiceStub.java:184)
>     at com.url.pkg.Client.main(Client.java:30)
> Skeleton Code :
> public com.url.pkg.ShowInputResponse showInput(
>         com.url.pkg.ShowInput showInput) {
>     // TODO : fill this with the necessary business logic
>     String inputString = showInput.getInputString();
>     System.out.println("INput String is :\n" + inputString);
>     XStream xStream = new XStream();
>     System.out.println("After XStream Declaration...");
>     SOVO vo = null;
>     try {
>         vo = (SOVO) xStream.fromXML(inputString);
>     } catch (Throwable e) {
>         System.out.println(e);
>         e.printStackTrace();
>     }
>     System.out.println("After SOVO casting from XML");
>     System.out.println(vo.getName());
>     System.out.println(vo.getParams());
>     // TODO: business logic
>     ShowInputResponse response = new ShowInputResponse();
>     response.set_return(inputString);
>     return response;
> }
> public class SOVO {
>     private String name;
>     private Map params;
>     public String getName() {
>         return name;
>     }
>     public void setName(String name) {
>         this.name = name;
>     }
>     public Map getParams() {
>         return params;
>     }
>     public void setParams(Map params) {
>         this.params = params;
>     }
> }
> WSDL file code:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://pkg.url.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://pkg.url.com">
>     <wsdl:types>
>         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pkg.url.com">
>             <xs:element name="showInput">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="inputString" nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="showInputResponse">
>                 <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="showInputRequest">
>         <wsdl:part name="parameters" element="ns:showInput"/>
>     </wsdl:message>
>     <wsdl:message name="showInputResponse">
>         <wsdl:part name="parameters" element="ns:showInputResponse"/>
>     </wsdl:message>
>     <wsdl:portType name="BasicServicePortType">
>         <wsdl:operation name="showInput">
>             <wsdl:input message="ns:showInputRequest" wsaw:Action="urn:showInput"/>
>             <wsdl:output message="ns:showInputResponse" wsaw:Action="urn:showInputResponse"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="BasicServiceSoap11Binding" type="ns:BasicServicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="showInput">
>             <soap:operation soapAction="urn:showInput" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BasicServiceSoap12Binding" type="ns:BasicServicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="showInput">
>             <soap12:operation soapAction="urn:showInput" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BasicServiceHttpBinding" type="ns:BasicServicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="showInput">
>             <http:operation location="BasicService/showInput"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="showInput"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <mime:content type="text/xml" part="showInput"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="BasicService">
>         <wsdl:port name="BasicServiceHttpSoap11Endpoint" binding="ns:BasicServiceSoap11Binding">
>             <soap:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>         <wsdl:port name="BasicServiceHttpSoap12Endpoint" binding="ns:BasicServiceSoap12Binding">
>             <soap12:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>         <wsdl:port name="BasicServiceHttpEndpoint" binding="ns:BasicServiceHttpBinding">
>             <http:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> Client Code:
> public static void main(String[] args) throws Exception {
>         BasicServiceStub stub = new BasicServiceStub();
>         ShowInput request = new ShowInput();
>         SOVO sovo = new SOVO();
>         sovo.setName("I am the post for SO");
>         Map params = new HashMap();
>         params.put("key1", "val1");
>         params.put("key2", "val2");
>         sovo.setParams(params);
>         XStream xStream = new XStream();
>         String soVoString = xStream.toXML(sovo);
>         // System.out.println(soVoString);
>         request.setInputString(soVoString);
>         ShowInputResponse response = stub.showInput(request);
>         System.out.println("....................................");
>         System.out.println("response = " + response.get_return());
>     }
> Can any one suggest what might be the issue and work around?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5116) AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat

Posted by "Sagara Gunathunga (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130527#comment-13130527 ] 

Sagara Gunathunga  commented on AXIS2-5116:
-------------------------------------------

Since this work on local machine most probably it can be a server configuration issue. Any way try again with 1.6.2 version and if you still get same error send your project to Axis2 user list. JIRA is not for assist with user questions.  
                
> AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5116
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5116
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.5.5
>         Environment: Tomcat , Windows, Java 6,Axis 2.15
>            Reporter: Arpan R
>            Priority: Blocker
>              Labels: axis2, tomcat
>
> Hi,
>  we were previously using the webservice AXIS-1.
>  And it was deployed in tomcat server at location (http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService).
> Now I am tryin to upgrade it to AXIS-2.
> I have written the WSDL , Generated the skeleton, Stubs. Added business logic in the skeleton.
> I created the aar file put it in the AXIS2_Home/services/repository... and it works fine.
> I tested the above scenario on my local machine and with AXIS-2 server.
> Now the same I am trying to do on the remote machine.
> I have changed the stub files to point it to http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService.In the constructor of the stub.
> After uploading the webservice to the tomcat if i hit the http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService I see the page which tells 
> SOPostWebService
> Hi there, this is an AXIS service!
> Perhaps there will be a form for invoking the service here...
> Now i trying to invoke the webservice from my code using stub but it fails on the                 _operationClient.execute(true); call in the stub.
> Stack trace is here :
> Caused by: org.apache.axis2.AxisFault: string
>     at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
>     at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
>     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
>     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>     at com.url.pkg.BasicServiceStub.showInput(BasicServiceStub.java:184)
>     at com.url.pkg.Client.main(Client.java:30)
> Skeleton Code :
> public com.url.pkg.ShowInputResponse showInput(
>         com.url.pkg.ShowInput showInput) {
>     // TODO : fill this with the necessary business logic
>     String inputString = showInput.getInputString();
>     System.out.println("INput String is :\n" + inputString);
>     XStream xStream = new XStream();
>     System.out.println("After XStream Declaration...");
>     SOVO vo = null;
>     try {
>         vo = (SOVO) xStream.fromXML(inputString);
>     } catch (Throwable e) {
>         System.out.println(e);
>         e.printStackTrace();
>     }
>     System.out.println("After SOVO casting from XML");
>     System.out.println(vo.getName());
>     System.out.println(vo.getParams());
>     // TODO: business logic
>     ShowInputResponse response = new ShowInputResponse();
>     response.set_return(inputString);
>     return response;
> }
> public class SOVO {
>     private String name;
>     private Map params;
>     public String getName() {
>         return name;
>     }
>     public void setName(String name) {
>         this.name = name;
>     }
>     public Map getParams() {
>         return params;
>     }
>     public void setParams(Map params) {
>         this.params = params;
>     }
> }
> WSDL file code:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://pkg.url.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://pkg.url.com">
>     <wsdl:types>
>         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pkg.url.com">
>             <xs:element name="showInput">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="inputString" nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="showInputResponse">
>                 <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="showInputRequest">
>         <wsdl:part name="parameters" element="ns:showInput"/>
>     </wsdl:message>
>     <wsdl:message name="showInputResponse">
>         <wsdl:part name="parameters" element="ns:showInputResponse"/>
>     </wsdl:message>
>     <wsdl:portType name="BasicServicePortType">
>         <wsdl:operation name="showInput">
>             <wsdl:input message="ns:showInputRequest" wsaw:Action="urn:showInput"/>
>             <wsdl:output message="ns:showInputResponse" wsaw:Action="urn:showInputResponse"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="BasicServiceSoap11Binding" type="ns:BasicServicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="showInput">
>             <soap:operation soapAction="urn:showInput" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BasicServiceSoap12Binding" type="ns:BasicServicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="showInput">
>             <soap12:operation soapAction="urn:showInput" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BasicServiceHttpBinding" type="ns:BasicServicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="showInput">
>             <http:operation location="BasicService/showInput"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="showInput"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <mime:content type="text/xml" part="showInput"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="BasicService">
>         <wsdl:port name="BasicServiceHttpSoap11Endpoint" binding="ns:BasicServiceSoap11Binding">
>             <soap:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>         <wsdl:port name="BasicServiceHttpSoap12Endpoint" binding="ns:BasicServiceSoap12Binding">
>             <soap12:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>         <wsdl:port name="BasicServiceHttpEndpoint" binding="ns:BasicServiceHttpBinding">
>             <http:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> Client Code:
> public static void main(String[] args) throws Exception {
>         BasicServiceStub stub = new BasicServiceStub();
>         ShowInput request = new ShowInput();
>         SOVO sovo = new SOVO();
>         sovo.setName("I am the post for SO");
>         Map params = new HashMap();
>         params.put("key1", "val1");
>         params.put("key2", "val2");
>         sovo.setParams(params);
>         XStream xStream = new XStream();
>         String soVoString = xStream.toXML(sovo);
>         // System.out.println(soVoString);
>         request.setInputString(soVoString);
>         ShowInputResponse response = stub.showInput(request);
>         System.out.println("....................................");
>         System.out.println("response = " + response.get_return());
>     }
> Can any one suggest what might be the issue and work around?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5116) AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat

Posted by "Sagara Gunathunga (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sagara Gunathunga  updated AXIS2-5116:
--------------------------------------

    Priority: Major  (was: Blocker)
    
> AxisFault: string at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext When server is deployed in tomcat
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5116
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5116
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.5.5
>         Environment: Tomcat , Windows, Java 6,Axis 2.15
>            Reporter: Arpan R
>              Labels: axis2, tomcat
>
> Hi,
>  we were previously using the webservice AXIS-1.
>  And it was deployed in tomcat server at location (http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService).
> Now I am tryin to upgrade it to AXIS-2.
> I have written the WSDL , Generated the skeleton, Stubs. Added business logic in the skeleton.
> I created the aar file put it in the AXIS2_Home/services/repository... and it works fine.
> I tested the above scenario on my local machine and with AXIS-2 server.
> Now the same I am trying to do on the remote machine.
> I have changed the stub files to point it to http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService.In the constructor of the stub.
> After uploading the webservice to the tomcat if i hit the http://ServerURL/webapps/BPQB-SOPostService-MYApp/services/SOPostWebService I see the page which tells 
> SOPostWebService
> Hi there, this is an AXIS service!
> Perhaps there will be a form for invoking the service here...
> Now i trying to invoke the webservice from my code using stub but it fails on the                 _operationClient.execute(true); call in the stub.
> Stack trace is here :
> Caused by: org.apache.axis2.AxisFault: string
>     at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
>     at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
>     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
>     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>     at com.url.pkg.BasicServiceStub.showInput(BasicServiceStub.java:184)
>     at com.url.pkg.Client.main(Client.java:30)
> Skeleton Code :
> public com.url.pkg.ShowInputResponse showInput(
>         com.url.pkg.ShowInput showInput) {
>     // TODO : fill this with the necessary business logic
>     String inputString = showInput.getInputString();
>     System.out.println("INput String is :\n" + inputString);
>     XStream xStream = new XStream();
>     System.out.println("After XStream Declaration...");
>     SOVO vo = null;
>     try {
>         vo = (SOVO) xStream.fromXML(inputString);
>     } catch (Throwable e) {
>         System.out.println(e);
>         e.printStackTrace();
>     }
>     System.out.println("After SOVO casting from XML");
>     System.out.println(vo.getName());
>     System.out.println(vo.getParams());
>     // TODO: business logic
>     ShowInputResponse response = new ShowInputResponse();
>     response.set_return(inputString);
>     return response;
> }
> public class SOVO {
>     private String name;
>     private Map params;
>     public String getName() {
>         return name;
>     }
>     public void setName(String name) {
>         this.name = name;
>     }
>     public Map getParams() {
>         return params;
>     }
>     public void setParams(Map params) {
>         this.params = params;
>     }
> }
> WSDL file code:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://pkg.url.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://pkg.url.com">
>     <wsdl:types>
>         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://pkg.url.com">
>             <xs:element name="showInput">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="inputString" nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="showInputResponse">
>                 <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="showInputRequest">
>         <wsdl:part name="parameters" element="ns:showInput"/>
>     </wsdl:message>
>     <wsdl:message name="showInputResponse">
>         <wsdl:part name="parameters" element="ns:showInputResponse"/>
>     </wsdl:message>
>     <wsdl:portType name="BasicServicePortType">
>         <wsdl:operation name="showInput">
>             <wsdl:input message="ns:showInputRequest" wsaw:Action="urn:showInput"/>
>             <wsdl:output message="ns:showInputResponse" wsaw:Action="urn:showInputResponse"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="BasicServiceSoap11Binding" type="ns:BasicServicePortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="showInput">
>             <soap:operation soapAction="urn:showInput" style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BasicServiceSoap12Binding" type="ns:BasicServicePortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
>         <wsdl:operation name="showInput">
>             <soap12:operation soapAction="urn:showInput" style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BasicServiceHttpBinding" type="ns:BasicServicePortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="showInput">
>             <http:operation location="BasicService/showInput"/>
>             <wsdl:input>
>                 <mime:content type="text/xml" part="showInput"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <mime:content type="text/xml" part="showInput"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="BasicService">
>         <wsdl:port name="BasicServiceHttpSoap11Endpoint" binding="ns:BasicServiceSoap11Binding">
>             <soap:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>         <wsdl:port name="BasicServiceHttpSoap12Endpoint" binding="ns:BasicServiceSoap12Binding">
>             <soap12:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>         <wsdl:port name="BasicServiceHttpEndpoint" binding="ns:BasicServiceHttpBinding">
>             <http:address location="http://localhost:8080/axis2/services/BasicService"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> Client Code:
> public static void main(String[] args) throws Exception {
>         BasicServiceStub stub = new BasicServiceStub();
>         ShowInput request = new ShowInput();
>         SOVO sovo = new SOVO();
>         sovo.setName("I am the post for SO");
>         Map params = new HashMap();
>         params.put("key1", "val1");
>         params.put("key2", "val2");
>         sovo.setParams(params);
>         XStream xStream = new XStream();
>         String soVoString = xStream.toXML(sovo);
>         // System.out.println(soVoString);
>         request.setInputString(soVoString);
>         ShowInputResponse response = stub.showInput(request);
>         System.out.println("....................................");
>         System.out.println("response = " + response.get_return());
>     }
> Can any one suggest what might be the issue and work around?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org