Hey Owen,
Could you please put this e-mail in FAQ section. I've
been trying to do the same for a long time before I
found one of the solutions described below. 
Thanks,
Krzysztof

 --- Owen D Burroughs <[EMAIL PROTECTED]> wrote: > 
> Rizwan,
> 
> A 407 error suggests that you need to authenticate
> with the proxy server.
> Therefore, in order to read the wsdl and invoke a
> service through the proxy
> you need a valid username and password. Assuming you
> have these, then you
> need to do the following:
> 
> Assuming the username is "fred" and the password is
> "cat" then:
> 
> 1) In order to retrieve and parse a wsdl document
> from behind an
> authenticating proxy, you can use the
> WSIFUtils.readWSDLThroughAuthProxy
> method:
> 
>  String wsdlLoc =
> "http://ws.cdyne.com/ziptogeo/zip2geo.asmx?wsdl";
>  char[] passwd = "cat".toCharArray();
>  java.net.PasswordAuthentication pa = new
> java.net.PasswordAuthentication
> ("fred", c);
>  Definition def =
> WSIFUtils.readWSDLThroughAuthProxy(wsdlLoc, pa);
> 
> 2) If using the Axis provider, you can invoke a
> service through an
> authenticating proxy by setting proxy usernames and
> passwords in one of two
> ways:
> 
> - Set system properties http.proxyUser and
> http.proxyPassword
> 
> or
> 
> - Set the username and password on the context
> message used by the service
> via:
> 
>   WSIFService service = ..... /// Get from factory
>   WSIFMessage ctx = service.getContext();
>  
>
ctx.setObjectPart(WSIFConstants.CONTEXT_HTTP_PROXY_USER,
> "fred");
>  
>
ctx.setObjectPart(WSIFConstants.CONTEXT_HTTP_PROXY_PWSD,
> "cat");
>   service.setContext(ctx);
> 
> 
> Hope this helps.
> 
> Regards,
> Owen
> 
> 
> 
> |---------+---------------------------->
> |         |           [EMAIL PROTECTED]|
> |         |           s.com            |
> |         |                            |
> |         |           16/07/2003 20:05 |
> |         |           Please respond to|
> |         |           wsif-user        |
> |         |                            |
> |---------+---------------------------->
>  
>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
>   |                                                 
>                                                     
>                                            |
>   |       To:       [EMAIL PROTECTED]         
>                                                     
>                                            |
>   |       cc:                                       
>                                                     
>                                            |
>   |       Subject:  Proxy Host                      
>                                                     
>                                            |
>   |                                                 
>                                                     
>                                            |
>   |                                                 
>                                                     
>                                            |
>  
>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
> 
> 
> 
> Hi,
> 
> Can someone please help?!  I am having problems when
> connecting via a WSIF
> client to the following
> web service @ 
> http://ws.cdyne.com/ziptogeo/zip2geo.asmx?wsdl
> 
> [ERROR] wsif - -WSIF0002E: A failure occurred in
> loading WSDL from
> 'http://ws.cdyne.com/ziptogeo/zip2geo.asmx?wsdl'
> 
> WSDLException: faultCode=OTHER_ERROR: Unable to
> resolve imported document
> at
> 'http://ws.cdyne.com/ziptogeo/zip2geo.asmx?wsdl'.:
> Server returned HTTP
> response code: 407 for URL:
> http://ws.cdyne.com/ziptogeo/zip2geo.asmx?wsdl:
> java.io.IOException: Server returned HTTP response
> code: 407 for URL:
> http://ws.cdyne.com/ziptogeo/zip2geo.asmx?wsdl
>       java.io.InputStream
>
sun.net.www.protocol.http.HttpURLConnection.getInputStream()
>             HttpURLConnection.java:562
>       java.lang.Object
> java.net.URLConnection.getContent()
>             URLConnection.java:558
>       java.lang.Object java.net.URL.getContent()
>             URL.java:812
>       java.io.InputStream
>
com.ibm.wsdl.util.StringUtils.getContentAsInputStream(java.net.URL)
>       javax.wsdl.Definition
>
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(java.lang.String,
> java.lang.String)
>       javax.wsdl.Definition
>
org.apache.wsif.util.WSIFUtils.readWSDL(java.lang.String,
> java.lang.String)
>       void
>
com.indus.banner.integration.transport.DynamicInvokerImpl.setupPort(java.lang.String,
> 
>  java.lang.String, java.lang.String)
>             DynamicInvokerImpl.java:79
>       org.apache.wsif.WSIFMessage
>
com.indus.banner.integration.transport.DIIComplex.invokeMethod(java.util.HashMap,
> 
>  java.lang.String, java.lang.String,
> java.lang.String, java.lang.String,
> java.lang.String)
> 
> This looks like a problem with the proxy settings in
> my environment.
> What confuses me is that calls to the following web
> service works fine
> without need for any
> special proxy setting setting. (
>
http://www.extensio.com:8080/ExtensioInfoServer/mbsoap/MBWSSoapServices.wsdl
> )
> 
> 
> Thanks
> Rizwan
> 
> ****************************************
> This email message and all attachments transmitted
> with it are for the sole
> use of the intended recipient(s) and may contain
> confidential and
> privileged information. Please DO NOT forward this
> email outside of the
> recipient's Company unless expressly authorized to
> do so herein.  Any
> unauthorized review, use, disclosure or distribution
> is prohibited. If you
> are not the intended recipient, please contact the
> sender by reply email
> and destroy all copies of the original message.
> 
> Any views expressed in this email message are those
> of the individual
> sender except where the sender specifically states
> them to be the views of
> Indus
>  International, Inc.
> ****************************************
> 
> 
> 
> 
> 
>  

Reply via email to