axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghu Upadhyayula (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-2352) XMLBeans client getting org.apache.axis2.AxisFault: First Element must contain the local name, Envelope
Date Tue, 03 Jul 2007 00:39:05 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-2352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509720
] 

Raghu Upadhyayula commented on AXIS2-2352:
------------------------------------------

Hi Dims,

             I've captured the SOAP Request & Response using tcpmon.  Here is the request
& Response.  It is throwing a NPE in AxisServlet.

Dev-Orion Login SOAP Request
--------------------------------------------
POST /webservices/services/ResponsysWSService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: dev-orion.corp.responsys.com:1234
Transfer-Encoding: chunked

119
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <ns1:login xmlns:ns1="urn:ws.rsys.com">
            <ns1:username>raghu</ns1:username>
            <ns1:password>raghu</ns1:password>
        </ns1:login>
    </soapenv:Body>
</soapenv:Envelope>
0

Dev-Orion Login SOAP Response
----------------------------------------------
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 1453
Date: Mon, 25 Jun 2007 18:06:51 GMT
Connection: close

<html>
    <head>
        <title>JBossWeb/2.0.0.GA - Error report</title>
        <style>
            <!--
            H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

            H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

            H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

            BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

            B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

            P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
            A {color : black;}A.name {color : black;}HR {color : #525D76;}
            -->
        </style>
    </head>
    <body>
        <h1>HTTP Status 500 - </h1>
        <HR size="1" noshade="noshade">
        <p><b>type</b> Exception report</p>
        <p><b>message</b> <u></u></p>
        <p>
            <b>description</b> 
            <u>The server encountered an internal error () that prevented it from fulfilling
this request.</u>
        </p>
        <p>
            <b>exception</b>
            <pre>
            java.lang.NullPointerException
                org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:170)
                javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            </pre>
        </p>
        <p>
        <b>note</b> 
        <u>The full stack trace of the root cause is available in the JBossWeb/2.0.0.GA
logs.</u>
        </p>
        <HR size="1" noshade="noshade">
        <h3>JBossWeb/2.0.0.GA</h3>
    </body>
</html>


thanks
Raghu

> XMLBeans client getting org.apache.axis2.AxisFault: First Element must contain the local
name, Envelope
> -------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2352
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2352
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api, codegen, wsdl
>    Affects Versions: 1.1.1
>         Environment: Windows XP, JDK 1.4.2_09
>            Reporter: Raghu
>            Assignee: Davanum Srinivas
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: axis2.log, TestWS.zip
>
>
>  This does not seem to be related to the REST problem mentioned in some of the other
issues. since on the server side (a non-Axis server) I see the following:
>  POST / HTTP/1.1
> SOAPAction: "bookstore.echoMe"
> User-Agent: Axis2
> Host: localhost:4444
> Transfer-Encoding: chunked
> Content-Type: text/xml; charset=UTF-8
> [Fatal Error] :-1:-1: Premature end of file.
> This is the process I followed:
> I installed the said version of Axis2 today.
> I have my own wsdl (produced below).
> I set up JAVA_HOME, AXIS2_HOME.
> Then I ran:
> c:\axis2-1.1.1\bin\wsdl2java.bat -f -d xmlbeans -uri c:\wsdl\bookstore.wsdl
> which produced dirs/files under my current directory.
> Then I wrote a client class to invoke the operation (produced below).
> When I run it I get this exception on the client side I get the following exception.
> org.apache.axis2.AxisFault: First Element must contain the local name, Envelope; nested
exception is: 
> 	org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local
name, Envelope
> 	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:126)
> 	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:252)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at bookstore.BookstoreStub.echoMe(BookstoreStub.java:141)
> 	at client_pkg.MyAxisClient.thisEchoMe(MyAxisClient.java:43)
> 	at client_pkg.MyAxisClient.main(MyAxisClient.java:22)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:324)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
> Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain
the local name, Envelope
> 	at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:217)
> 	at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:175)
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:120)
> 	at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:159)
> 	at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion(StAXSOAPModelBuilder.java:133)
> 	at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:108)
> 	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:120)
> 	... 11 more
> Here is the wsdl file:
> <definitions name="bookstoredefinitions" targetNamespace="bookstore" xmlns:tns="bookstore"
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>   <types>
>     <xsd:schema targetNamespace="bookstore"  elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="bookstore">
>       <xsd:element name="echoMe">
>         <xsd:complexType>
>           <xsd:sequence>
>             <xsd:element name="AuthorName">
>               <xsd:complexType>
> 	        <xsd:attribute name="Value" type="xsd:string"/>	                   
>               </xsd:complexType>
>             </xsd:element>
>             <xsd:element name="BookName">
>               <xsd:complexType>
>                 <xsd:attribute name="Value" type="xsd:string"/>               
>               </xsd:complexType>
>             </xsd:element>
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>       <xsd:element name="echoMeResponse">
>         <xsd:complexType>
>           <xsd:sequence>
>             <xsd:element name="AuthorName">
>               <xsd:complexType>
> 	          <xsd:attribute name="Value" type="xsd:string"/>	                   

>               </xsd:complexType>
>             </xsd:element>
>             <xsd:element name="BookName">
>               <xsd:complexType>
> 	          <xsd:attribute name="Value" type="xsd:string"/>
>               </xsd:complexType>
>             </xsd:element>
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>     </xsd:schema>
>   </types>
>   <message name="echoMe">
>     <part name="parameters" element="tns:echoMe"/>
>   </message>
>   <message name="echoMeResponse">
>     <part name="parameters" element="tns:echoMeResponse"/>
>   </message>
>   <portType name="bookstoreportType">
>     <operation name="echoMe">
>       <input message="tns:echoMe" />
>       <output message="tns:echoMeResponse" />
>     </operation>
>   </portType>
>   <binding name="bookstorebinding" type="tns:bookstoreportType">
>     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="echoMe">
>       <soap:operation soapAction="bookstore.echoMe"/>
>       <input>
>         <soap:body use="literal"/>
>       </input>
>       <output>
>         <soap:body use="literal"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="bookstore">
>     <port binding="tns:bookstorebinding" name="bookstoreport">
>       <soap:address location="http://localhost:4444"/>
>     </port>
>   </service>
> </definitions>
> Is there a way I can include all the generated files?
> Here is the client code:
> package client_pkg;
> import bookstore.BookstoreStub;
> import bookstore.EchoMeDocument;
> import bookstore.EchoMeResponseDocument;
> import bookstore.impl.EchoMeDocumentImpl;
> import org.apache.xmlbeans.XmlOptions;
> public class MyAxisClient
> {
>   public static void main( String args[] ) throws Exception
>   {
>     BookstoreStub stub = new BookstoreStub();
>     
>     thisEchoMe(stub);
>   }
>   
>   public static void thisEchoMe(BookstoreStub stub)
>   {
>     try {
>       EchoMeDocument reqDoc = EchoMeDocument.Factory.newInstance();
>       EchoMeDocument.EchoMe req = reqDoc.addNewEchoMe();
>             
>       EchoMeDocument.EchoMe.AuthorName aname = req.addNewAuthorName();
>       aname.setValue("AuthorZ");
>       
>       EchoMeDocument.EchoMe.BookName bname = req.addNewBookName();
>       bname.setValue("BookZ");
>       
>       stub.echoMe(reqDoc);
>       
>     }
>     catch (Exception e)
>     {
>       e.printStackTrace();
>       System.out.println("\n\n\n");
>     }
>   }
>   
> }
> Please let me know if you need to know anything else.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message