users@jax-ws.java.net

Re: JAX-WS clients not honoring proxySet and/or http(s).nonProxyHosts?

From: Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
Date: Tue, 03 Jul 2007 11:16:17 -0700

Do you see the same behaviour when you write an application which uses
JDK's HttpURLConnection ? For the most part, JAX-WS uses JDK's
HttpURLConnection. Also can you see whether your properties are listed
in the JDK's documentation.

http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html

Jitu

Andreas Loew wrote:
> All,
>
> am I doing something wrong, or are neither "proxySet" nor
> "http.nonProxyHosts" and "https.nonProxyHosts" system properties taken
> into account by the JAX-WS runtime when doing a web service client call?
>
> (I am using a recent WSIT daily build.)
>
> My JVM configuration sets the following properties:
>
> <jvm-options>-DproxySet=false</jvm-options>
> <jvm-options>-Dhttp.nonProxyHosts="localhost|*.Germany.Sun.COM"</jvm-options>
>
> <jvm-options>-Dhttp.proxyHost=192.109.213.5</jvm-options>
> <jvm-options>-Dhttp.proxyPort=8080</jvm-options>
> <jvm-options>-Dhttps.nonProxyHosts="localhost|*.Germany.Sun.COM"</jvm-options>
>
> <jvm-options>-Dhttps.proxyHost=192.109.213.5</jvm-options>
> <jvm-options>-Dhttps.proxyPort=8080</jvm-options></java-config>
>
> Still, any WS client requests to
>
> http://nb-al130959.Germany.Sun.COM:8080/vine2-wsn-consumer/services/NotificationConsumer
>
>
> end up at the Squid proxy running on 192.109.213.5 (for details, see
> below) :-(
>
> Any ideas?
>
> Thanks in advance,
>
> Andreas
>
>
> ======
>
> Using target endpoint URL:
> http://nb-al130959.Germany.Sun.COM:8080/vine2-wsn-consumer/services/NotificationConsumer
>
> Using client WSDL URL:
> jndi:/server/vine2-wsn-producer/WEB-INF/wsdl/NotificationConsumer/vine2-wsn-consumer-client.wsdl
>
> Using service name:
> {http://docs.oasis-open.org/wsn/bw-2}NotificationConsumerService
> invoking NotificationConsumer...
> ---[HTTP request]---
> SOAPAction: ""
> Content-Type:
> multipart/related;type="application/xop+xml";boundary="uuid:bfb35da4-6a80-4230-82e2-9903e6a1d1fb";start-info="application/soap+xml";action="http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify"
>
> Accept: application/soap+xml, multipart/related, text/html, image/gif,
> image/jpeg, *; q=.2, */*; q=.2
> --uuid:bfb35da4-6a80-4230-82e2-9903e6a1d1fb
> Content-Id:
> <rootpart*bfb35da4-6a80-4230-82e2-9903e6a1d1fb_at_example.jaxws.sun.com>
> Content-Type:
> application/xop+xml;charset=utf-8;type="application/soap+xml"
> Content-Transfer-Encoding: binary
> <?xml version="1.0" ?><S:Envelope
> xmlns:S="http://www.w3.org/2003/05/soap-envelope"
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><S:Header><To
> xmlns="http://www.w3.org/2005/08/addressing">http://nb-al130959.Germany.Sun.COM:8080/vine2-wsn-consumer/services/NotificationConsumer</To><Action
> xmlns="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</Action><wsse:Security
> S:mustUnderstand="true"><wsu:Timestamp
> xmlns:ns13="http://schemas.xmlsoap.org/soap/envelope/" xmlns=""
> wsu:Id="1"><wsu:Created>2007-07-03T12:29:01Z</wsu:Created><wsu:Expires>2007-07-03T12:34:01Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken
> xmlns:ns13="http://schemas.xmlsoap.org/soap/envelope/" xmlns=""
> wsu:Id="48074cd4-4a49-4bcd-9091-9e3a5b521c84"><wsse:Username>caps_vf_gsp_tts</wsse:Username><wsse:Password>PogaymCAooe9V</wsse:Password></wsse:UsernameToken></wsse:Security></S:Header><S:Body><ns4:Notify
> xmlns:ns5="http://docs.oasis-open.org/wsrf/r-2"
> xmlns:ns4="http://docs.oasis-open.org/wsn/b-2"
> xmlns:ns3="http://www.w3.org/2005/08/addressing"
> xmlns:ns2="http://docs.oasis-open.org/wsrf/bf-2"
> xmlns="http://docs.oasis-open.org/wsn/t-1"><ns4:NotificationMessage><ns4:SubscriptionReference><ns3:Address>https://localhost:8181/vine2-wsn-producer/services/NotificationProducer</ns3:Address><ns3:ReferenceParameters><Subscription:Subscription
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> xmlns="http://www.vodafone.com/oss/xml/wsn/SubscriptionReference"
> xmlns:Subscription="http://www.vodafone.com/oss/xml/wsn/SubscriptionReference">193</Subscription:Subscription></ns3:ReferenceParameters><ns3:Metadata></ns3:Metadata></ns4:SubscriptionReference><ns4:ProducerReference><ns3:Address>https://localhost:8181/vine2-wsn-producer/services/NotificationProducer</ns3:Address><ns3:ReferenceParameters></ns3:ReferenceParameters><ns3:Metadata></ns3:Metadata></ns4:ProducerReference><ns4:Message><ossj:Message
> xmlns:ossj="http://java.sun.com/products/oss/xml/WsnOssj"><beverages
> xmlns="" xmlns:ns7="http://docs.oasis-open.org/wsn/t-1">
> <coffee>
> <name>Kona</name>
> <price>13.50</price>
> </coffee>
> <tea>
> <name>Darjeeling</name>
> <price>13.50</price>
> </tea>
> </beverages></ossj:Message></ns4:Message></ns4:NotificationMessage></ns4:Notify></S:Body></S:Envelope>
>
> --uuid:bfb35da4-6a80-4230-82e2-9903e6a1d1fb--
> --------------------
> ---[HTTP response 503]---
> Mime-version: 1.0
> Date: Tue, 03 Jul 2007 12:28:59 GMT
> null: HTTP/1.0 503 Service Unavailable
> Content-length: 1313
> Content-type: text/html
> X-cache-lookup: MISS from www.ascom-ac.de:8080
> Expires: Tue, 03 Jul 2007 12:28:59 GMT
> X-cache: MISS from www.ascom-ac.de
> Proxy-connection: keep-alive
> Server: squid/2.5.STABLE6
> X-squid-error: ERR_DNS_FAIL 0
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;
> charset=iso-8859-1">
> <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
> <STYLE
> type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
>
> </HEAD><BODY>
> <H2>The requested URL could not be retrieved</H2>
> <HR noshade size="1px">
> <P>
> While trying to retrieve the URL:
> <A
> HREF="http://nb-al130959.germany.sun.com:8080/vine2-wsn-consumer/services/NotificationConsumer">http://nb-al130959.germany.sun.com:8080/vine2-wsn-consumer/services/NotificationConsumer</A>
>
> <P>
> The following error was encountered:
> <BLOCKQUOTE>
> Unable to determine IP address from host name for
> <I>nb-al130959.germany.sun.com</I>
> </BLOCKQUOTE>
> <P>
> The dnsserver returned:
> <BLOCKQUOTE>
> Name Error: The domain name does not exist.
> </BLOCKQUOTE>
> <P>
> This means that:
> <PRE>
> The cache was not able to resolve the hostname presented in the URL.
> Check if the address is correct.
> </PRE>
> <P>Your cache administrator is <A HREF="mailto:admin">admin</A>.
> <BR clear="all">
> <HR noshade size="1px">
> <ADDRESS>
> Generated Tue, 03 Jul 2007 12:28:59 GMT by www.ascom-ac.de
> (squid/2.5.STABLE6)
> </ADDRESS>
> </BODY></HTML>
> --------------------
>
>