axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: Axis2 parsing failure
Date Sat, 17 Mar 2007 20:18:51 GMT
Rich,

jira please!

-- dims

On 3/16/07, Rich Adili <Rich.Adili@xata.com> wrote:
>
>
>
> To debug a SOAP response failure, I copied the response to a text file and
> wrote this code. The SOAP message follows. This problem is a bit too deep
> for my shallow understanding of Axis. Any ideas why Axis can't cope with
> this message?
>
> java.lang.NullPointerException
>
>         at
> com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)
>
>         at
> com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)
>
>         at
> com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)
>
>         at
> org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:146)
>
>         at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:329)
>
>         at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:171)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:792)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:781)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:796)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:781)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:796)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:781)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:796)
>
>         at
> org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:179)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:781)
>
>         at
> org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:343)
>
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:940)
>
>         at java.lang.String.valueOf(String.java:2131)
>
>         at java.io.PrintStream.print(PrintStream.java:462)
>
>         at java.io.PrintStream.println(PrintStream.java:599)
>
>         at junk.main(junk.java:21)
>
>         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:90)
>
>
>
> import org.apache.axiom.om.OMElement;
>
> import org.apache.axiom.om.util.StAXUtils;
>
> import
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
>
> import javax.xml.stream.XMLStreamReader;
>
> import java.io.File;
>
> import java.io.FileInputStream;
>
> public class junk
>
> {
>
>         public static void main(String[] args)
>
>         {
>
>                 try
>
>                 {
>
>                         FileInputStream inStream = new FileInputStream(new
> File("src/junk.xml"));
>
>                         XMLStreamReader xmlreader =
> StAXUtils.createXMLStreamReader(inStream, "utf-8");
>
>                         StAXSOAPModelBuilder builder =
>
>                                         new StAXSOAPModelBuilder(xmlreader,
>
>
> "http://schemas.xmlsoap.org/soap/envelope/");
>
>                         final OMElement docEl =
> builder.getDocumentElement();
>
>                         System.err.println(docEl);
>
>                 } catch (Exception e)
>
>                 {
>
>                         e.printStackTrace();
>
>                 }
>
>         }
>
> }
>
>
>
>
>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
>
>
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>
>
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
>
>         <soap:Header>
>
>                 <wsa:Action>
>
>
> http://www.xatanet.net/XataNetWebService/xatadispatchwebservice/GetActualDispatchPlanByTripIDResponse
>
>                 </wsa:Action>
>
>
> <wsa:MessageID>uuid:0225f814-449e-4b29-9583-66b29f68b0ba</wsa:MessageID>
>
>
> <wsa:RelatesTo>uuid:e5d1ad0e-e532-401c-808b-f78a4b509208</wsa:RelatesTo>
>
>
> <wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
>
>                 <wsse:Security>
>
>                         <wsu:Timestamp
> wsu:Id="Timestamp-8cd9c60e-5845-461c-8ab8-4e34082aa215">
>
>
> <wsu:Created>2007-03-17T01:47:35Z</wsu:Created>
>
>
> <wsu:Expires>2007-03-17T01:52:35Z</wsu:Expires>
>
>                         </wsu:Timestamp>
>
>                 </wsse:Security>
>
>         </soap:Header>
>
>         <soap:Body>
>
>                 <GetActualDispatchPlanByTripIDResult
>
>
> xmlns="http://www.xatanet.net/XataNetWebService/xatadispatchwebservice">
>
>                         <xs:schema id="TripDataConduitDataObject" xmlns=""
>
>
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
>
> xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
>
>                                 <xs:element
> name="TripDataConduitDataObject" msdata:IsDataSet="true"
>
>                                             msdata:UseCurrentLocale="true">
>
>                                         <xs:complexType>
>
>                                                 <xs:choice minOccurs="0"
> maxOccurs="unbounded">
>
>                                                         <xs:element
> name="Trip">
>
>
> <xs:complexType>
>
>
> <xs:attribute name="TripID" msdata:ReadOnly="true"
>
>
>          msdata:AutoIncrement="true" type="xs:int"
>
>
>          use="required"/>
>
>
> <xs:attribute name="CurrentRevisionNumber" type="xs:int"/>
>
>
> <xs:attribute name="IsDispatch" type="xs:boolean"/>
>
>
> <xs:attribute name="IsActive" type="xs:boolean"/>
>
>
> <xs:attribute name="IsComplete" type="xs:boolean"/>
>
>
> <xs:attribute name="IsArchived" type="xs:boolean"/>
>
>
> <xs:attribute name="IsPlanValid" type="xs:boolean"/>
>
>
> <xs:attribute name="IsActualValid" type="xs:boolean"/>
>
>
> <xs:attribute name="XVIN" type="xs:int"/>
>
>
> <xs:attribute name="OrganizationID" type="xs:int"/>
>
>
> <xs:attribute name="UserDefinedRouteID" type="xs:string"/>
>
>
> <xs:attribute name="UserDefinedTripID" type="xs:string"/>
>
>
> <xs:attribute name="PlanStartDate" type="xs:dateTime"/>
>
>
> <xs:attribute name="StartDate" type="xs:dateTime"/>
>
>
> <xs:attribute name="EndDate" type="xs:dateTime"/>
>
>
> <xs:attribute name="LastMessageDate" type="xs:dateTime"/>
>
>
> <xs:attribute name="LastMessageType" type="xs:string"/>
>
>
> <xs:attribute name="TripType" type="xs:string"/>
>
>
> <xs:attribute name="LastLocation" type="xs:string"/>
>
>
> <xs:attribute name="TimeVariance" type="xs:int"/>
>
>
> <xs:attribute name="DateLastModified" type="xs:dateTime"/>
>
>
> <xs:attribute name="DispatchCreationDate" type="xs:dateTime"/>
>
>
> <xs:attribute name="DispatchLastXVIN" type="xs:int"/>
>
>
> <xs:attribute name="DispatchLastStartedDate" type="xs:int"/>
>
>
> <xs:attribute name="DispatchLastDriverID" type="xs:int"/>
>
>
> <xs:attribute name="ArchiveDate" type="xs:dateTime"/>
>
>
> <xs:attribute name="TripData" type="xs:string"/>
>
>
> <xs:attribute name="UserComments" type="xs:string"/>
>
>
> <xs:attribute name="XataNetUserID" type="xs:int"/>
>
>
> <xs:attribute name="Reason" type="xs:string"/>
>
>
> <xs:attribute name="DateOfQuery" type="xs:dateTime"/>
>
>
> </xs:complexType>
>
>                                                         </xs:element>
>
>                                                 </xs:choice>
>
>                                         </xs:complexType>
>
>                                         <xs:unique
> name="TripDataConduitDataObjectKey1"
> msdata:PrimaryKey="true">
>
>                                                 <xs:selector
> xpath=".//Trip"/>
>
>                                                 <xs:field xpath="@TripID"/>
>
>                                         </xs:unique>
>
>                                 </xs:element>
>
>                         </xs:schema>
>
>                         <diffgr:diffgram
> xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
>
>
> xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
>
>                                 <TripDataConduitDataObject xmlns="">
>
>                                         <Trip diffgr:id="Trip1"
> msdata:rowOrder="0" TripID="62174"
>
>                                               CurrentRevisionNumber="1"
> IsDispatch="true" IsActive="false"
>
>                                               IsComplete="false"
> IsArchived="false" IsPlanValid="false"
>
>                                               IsActualValid="false"
> XVIN="2079" OrganizationID="365"
>
>                                               UserDefinedRouteID="MyRoute"
> PlanStartDate="2007-03-16T19:27:00.7-05:00"
>
>
> StartDate="2007-03-16T14:27:50.013-05:00"
>
>
> EndDate="2007-03-16T14:27:50.013-05:00"
>
>
> LastMessageDate="2007-03-16T14:27:50.013-05:00"
> LastMessageType=""
>
>                                               TripType="Normal"
> LastLocation="" TimeVariance="0"
>
>
> DateLastModified="2007-03-16T19:29:25.493-05:00"
>
>
> DispatchCreationDate="2007-03-16T14:27:50.013-05:00"
> DispatchLastXVIN="0"
>
>                                               DispatchLastStartedDate="0"
> ArchiveDate="2007-03-16T14:27:50.013-05:00"
>
>                                               TripData="&lt;Trip
> InternalElementID=&quot;1&quot; TripType=&quot;Normal&quot;
> UserID=&quot;1086&quot;
> OrganizationID=&quot;365&quot;&gt;&#xA;&lt;Plan
> InternalElementID=&quot;2&quot;
> UserDefinedRouteID=&quot;MyRoute&quot;
> XVIN=&quot;2079&quot; UseRouteTemplate=&quot;No&quot;
> BeginTime=&quot;2007-03-16T19:27:00&quot;
> AdjustTripBeginTime=&quot;True&quot;
> LibraryUpload=&quot;True&quot;&gt;&#xA;&lt;PlanStop
> InternalElementID=&quot;3&quot; StopNumber=&quot;BEG&quot;
> XSiteID=&quot;0&quot;
> SiteID=&quot;mylittleplaceinthewoods&quot;
> ArrivalLock=&quot;False&quot;
> ArrivalTime=&quot;2007-03-16T19:27:00&quot;
> DepartureTime=&quot;2007-03-16T19:27:00&quot;
> LegOverride=&quot;False&quot; LegTime=&quot;0&quot;
> LegMiles=&quot;0&quot;&gt;&#xA;&lt;PlanCargo
> InternalElementID=&quot;4&quot; Action=&quot;Pick&quot; Units=&quot;0&quot;
> Weight=&quot;300000&quot; BillID=&quot;Bill_0&quot; Duration=&quot;0&quot;
> /&gt;&#xA;&lt;ValidationLocationError
> InternalElementID=&quot;5&quot; Description=&quot;Site ID must be
> specified.&quot; Resolution=&quot;None&quot; /&gt;&#xA;&lt;ValidationError
> InternalElementID=&quot;6&quot; Description=&quot;Unable to retrieve
> FixedStopTime from site.&quot;
> /&gt;&#xA;&lt;/PlanStop&gt;&#xA;&lt;/Plan&gt;&#xA;&lt;/Trip&gt;&#xA;"
>
>
> DateOfQuery="2007-03-17T01:47:35.39-05:00"/>
>
>                                 </TripDataConduitDataObject>
>
>                         </diffgr:diffgram>
>
>                 </GetActualDispatchPlanByTripIDResult>
>
>         </soap:Body>
>
> </soap:Envelope>
>
>


-- 
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

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


Mime
View raw message