• 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

please help me create a webservice client WSDL

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i create a webservice https://demo017.service-now.com/u_ntq001.do?WSDL but i can't using client for that.
it request authentication user:"admin" password:"admin".
when i created webservice client i was fill user and password for form of netbeans but when i run a function of this webservice i have exception:
Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 401: Unauthorized
but when i use soapui for call this service it's okie with fill username and password per request
who can demo a client by java call this webservice? or give me how to fix exception?
my code: http://www.fshare.vn/file/MJV6HSNGDL/

thanks many!
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can add soap header for authentication using the approach in the answer here: http://stackoverflow.com/questions/14220792/how-to-authenticate-a-web-service-client-with-jax-ws-soap
 
nam nguyen quang
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks , i was fix it . but i have exception:
com.sun.xml.internal.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://www.service-now.com/u_ntq001}updateResponse but found: {null}updateResponse

query run ok but what is exception?
likely https://coderanch.com/t/525005/Web-Services/java/unexpected-XML-tag-JAX-WS
 
He puts the "turd" in "saturday". Speaking of which, have you smelled 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