• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue with namespaces while consuming a service

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have exposed a service
the wsdl has a namespace with impl.

the service implementation extracts the name space for the operation and executes a business logic based on name space.


i am trying to consume the web service by java client.

i am able to invoke the service but name space is missing in the request.
the current request is
<getSecurityParam xmlns="http://impl.endpoint.security.ws.com">

it has to be

<getSecurityParam xmlns:impl="http://impl.endpoint.security.ws.com">

i have generated client using eclipse.

any help is appreciated.


 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. To prefix the namespace, you could modify the generated client and call addNamespaceDeclaration: http://java.sun.com/javase/6/docs/api/javax/xml/soap/SOAPElement.html#addNamespaceDeclaration(java.lang.String, java.lang.String)

Please see an example here: http://www.devdaily.com/java/jwarehouse/axis2-1.3/modules/saaj/test/org/apache/axis2/saaj/SOAPFaultTest.java.shtml
And let me know if that works
 
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic