aspose file tools*
The moose likes Web Services and the fly likes please help me create a webservice client WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "please help me create a webservice client WSDL" Watch "please help me create a webservice client WSDL" New topic
Author

please help me create a webservice client WSDL

nam nguyen quang
Greenhorn

Joined: Dec 18, 2013
Posts: 8
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

Joined: Mar 17, 2012
Posts: 892
    
    9
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

Joined: Dec 18, 2013
Posts: 8
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
 
Consider Paul's rocket mass heater.
 
subject: please help me create a webservice client WSDL