Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace getting Removed During unmarshalling in Spring inbound and outBound gateway Marshall [SWS-898] #976

Open
gregturn opened this issue Apr 20, 2015 · 2 comments

Comments

@gregturn
Copy link
Member

@gregturn gregturn commented Apr 20, 2015

jagadeesh sivasankaran opened SWS-898 and commented

I have a PRoxy Webservice using spring Integration inboun and outbound gateWay MArshall . Respone comes from the actual webservice is getting altered in unmarshalling .
Example : - actual respone received from webservice with namespace "xmlns:xs="http://www.w3.org/2001/XMLSchema" .

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <env:Header>
      <ser:responseHeader xsi:nil="true" xmlns:ser="http://myComPany/services"/>
   </env:Header>
   <env:Body>
      <ser:getValues xmlns:ser="http://myComPany/services">

Respone received from inbound gateway after unmarshalling ..

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header>
      <responseHeader xmlns="http://myCompany/services">
         <TransactionId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
         <Timestamp xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
         <ResponseId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
      </responseHeader>
   </env:Header>
   <env:Body>
      <ns2:getValues xmlns:ns2="http://mycompany/services" xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/">
	  <ser:return soapenc:arrayType="xs:anyType[3]">

In this above output , namespace "xmlns:xs="http://www.w3.org/2001/XMLSchema" missing, due to this getting error. so error at "xs:anyType[3]"


No further details from SWS-898

@gregturn
Copy link
Member Author

@gregturn gregturn commented Apr 21, 2015

Arjen Poutsma commented

It seems like you are using a RPC/Encoded style of Web service, which is essentially deprecated in the Basic Profile. Spring-WS only supports document/literal web services. So you're pretty much on your own here.

That said, you can add a custom namespace declaration of any SOAP element by using http://docs.spring.io/spring-ws/docs/current/api/org/springframework/ws/soap/SoapElement.html#addNamespaceDeclaration-java.lang.String-java.lang.String-

@gregturn
Copy link
Member Author

@gregturn gregturn commented Apr 21, 2015

jagadeesh sivasankaran commented

How can intercept the inbound-gateway respone to add custom namespace in "addNAmespaceDEclaration" soapElement, ? . i am able to do it in outbound..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.