JAXB:SOAP信封中声明的默认命名空间在Body';s xsi:在解组时键入
下面是来自服务器的伪soap响应,如下所示JAXB:SOAP信封中声明的默认命名空间在Body';s xsi:在解组时键入,soap,namespaces,jaxb,unmarshalling,xsitype,Soap,Namespaces,Jaxb,Unmarshalling,Xsitype,下面是来自服务器的伪soap响应,如下所示 <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="urn://tsys.com/xmlmessaging/T1"> <soap:Head
<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="urn://tsys.com/xmlmessaging/T1">
<soap:Header>
<Header details/>
</soap:Header>
<soap:Body>
<inqMultiResponse>
<inqMultiResult status="000" statusMsg="passed" >
<inquireResult xsi:type="inqCustAddrResponseType" >
<addrInfo>
<addrType>Primary</addrType>
....
<x_4.0.0/>
</addrInfo>
</inquireResult>
<inquireResult xsi:type="inqGeneralAcctResponseType" status="000" statusMsg="passed">
<acctGeneralInfo>
<type>Z</type>
....
</stmtInfo>
<x_4.4.0/>
</acctGeneralInfo>
</inquireResult>
</inqMultiResult>
</inqMultiResponse>
</soap:Body>
下面是我的spring配置
<bean id="tsysTransactionMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="validationEventHandler" ref="validationEventHandler" />
<property name="contextPaths">
<list>
<value>com.tsys.xmlmessaging.t1</value>
</list>
</property>
</bean>
com.tsys.xmlmessaging.t1
请您帮助我解开xml
我经历了各种各样的建议,比如
还有Blaise D博客,但没有一个像我的例子那样提到将它与Jaxb2Marshaller一起使用
请注意,-这些类是使用XJC生成的。不包括在这里,以确保我不混乱与不必要的信息。如果需要更多信息,请告诉我。
-我们无法控制从服务器发送的xml soap响应,因此我们可能无法更改它们。您是否尝试使用MOXy而不是JAXB RI?否@IanRoberts,我认为我们没有被指示使用MOXy。我们没有JAXB RI上的soln吗?如果没有,那么,我们可能不得不向客户提出同样的建议(MOXy)。
<bean id="tsysTransactionMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="validationEventHandler" ref="validationEventHandler" />
<property name="contextPaths">
<list>
<value>com.tsys.xmlmessaging.t1</value>
</list>
</property>
</bean>