This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 2
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: 761
    
    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: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please help me create a webservice client WSDL
 
Similar Threads
JAAS Login Module: HOw to extract user id and password from web service request.
Error while deploying the war file using command "asant deploy"
how to bind authorization code with http request when sending webservice request
Bean not passed to web service (SOAP / Apache CXF)
Issue while deploying web service jwstutorial example CLI171