Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please help me create a webservice client WSDL

 
nam nguyen quang
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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!
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • 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
  • 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 http://www.coderanch.com/t/525005/Web-Services/java/unexpected-XML-tag-JAX-WS
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic