问题描述
<?xmlversion="1.0"encoding="UTF-8"?><SOAP:Envelopexmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><SOAP:Headerxmlns:SAP="http://sap.com/xi/XI/Message/30"xmlns:xlink="http://www.w3.org/1999/xlink"xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"xmlns:wsse="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"xmlns:versionMajor="003"xmlns:versionMinor="001"xmlns:mustUnderstand="1"xmlns:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7"><wsse:Securityxmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestampwsu:Id="bb4df9da-0af1-4030-b852-24c6a873eea1"xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2014-11-21T01:56:59Z</wsu:Created><wsu:Expires>2014-11-21T02:01:59Z</wsu:Expires></wsu:Timestamp><saml2:AssertionID="69767b9a-6642-45c2-8ca2-b8a9ba1e3291"IssueInstant="2014-11-21T01:56:59Z"Version="2.0"xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"><saml2:Issuer>https://ws-gateway</saml2:Issuer><saml2:Subject><saml2:NameIDFormat="urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified"NameQualifier="http://xmldefs.prepar.com/Technical/Security/NameQualifier/V1#Anonymous">UNKNOWN</saml2:NameID><saml2:SubjectConfirmationMethod="urn:oasis:names:tc:SAML:2.0:cm:sender-vouches"/></saml2:Subject><saml2:ConditionsNotBefore="2014-11-21T01:55:59Z"NotOnOrAfter="2014-11-21T02:01:59Z"/><saml2:Advice><saml2:AssertionID="63d396b4-c748-4c67-9bd1-19006e24e5e5"IssueInstant="2014-11-21T01:56:59Z"Version="2.0"><saml2:Issuer>https://ws-gateway</saml2:Issuer><saml2:Subject><saml2:NameIDFormat="urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified"NameQualifier="http://xmldefs.prepar.com/Technical/Security/NameQualifier/V1#LegacySystemID">TAMCRMQ</saml2:NameID><saml2:SubjectConfirmationMethod="urn:oasis:names:tc:SAML:2.0:cm:sender-vouches"/></saml2:Subject><saml2:ConditionsNotBefore="2014-11-21T01:55:59Z"NotOnOrAfter="2014-11-21T02:01:59Z"/><saml2:AuthnStatementAuthnInstant="2014-11-21T01:56:59Z"><saml2:AuthnContext><saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient</saml2:AuthnContextClassRef></saml2:AuthnContext></saml2:AuthnStatement></saml2:Assertion></saml2:Advice></saml2:Assertion></wsse:Security></SOAP:Header><!--文件头结束--><!--文件内容--><SOAP:Bodywsu:Id="72f5bb53-6f88-428c-837a-5a233a98e2d2"xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><ns0:ProcessShortMessagesxmlns:ns0="http://xmldefs.prepar.com/Technical/ShortMessageService/V1"><ns0:ShortMessages><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--><!--shorMessagebegin--><ns0:ShortMessage><ns0:TransmissionControl><ns0:Plan>premium</ns0:Plan></ns0:TransmissionControl><ns0:Receivers><ns0:Receiver><ns0:Name>王静</ns0:Name><ns0:ShortMessageID>CM:123</ns0:ShortMessageID></ns0:Receiver></ns0:Receivers><ns0:Message><ns0:MessageTypelistID="CL00618"listVersionID="1"name="Standard"/><ns0:MessageTexts><ns0:AddRess>海淀区中关村科技大厦2501室</ns0:AddRess></ns0:MessageTexts></ns0:Message></ns0:ShortMessage><!--ShortMessageend--></ns0:ShortMessages></ns0:ProcessShortMessages></SOAP:Body></SOAP:Envelope>
上面是一段WebService的客户端向服务端发送的报文,需要用Java解析,已经试过Jax-ws,xfire两种方式进行解析过了,xfire对SOAP:Header上的xmlns:versionMajor="003"报命名空间不能以数字开头,而Jax-ws不能解析<ns0:ShortMessages>的值,只能解析<arg0>的值,所以郁闷了,现在客户端还不能变,服务端必须满足这个报文的标准,哪位高手帮着解决下呢。
解决方案
解决方案二:
晕死。这种东西维护起来多么令人讨厌。你应该使用一个简单的HTTPPost来做服务,消息体中有个简单的json字符串就行了。那时候,跨平台才成为可能。
解决方案三:
“符合客户端标准”,不用做这个梦了。这个需求拿到2007年以前还可以,之后就已经变成web轻量级的世界了,你还沉浸在xml、webservice的教条中。这种东西只有维持那个时代的个别程序才用,而制定新程序的跨平台标准,不应该用它。更何况你只要一搜就知道,这个东西并不跨java平台。
解决方案四:
json你值得拥有。。。。浏览器,客户端,安卓,ios通吃
解决方案五:
没有人懂吗?