Question

I am trying to deploy my composite project to production environment which has a domain i.e.

esbservices.mydomain.com

I successfully get WSDL from my domain through this URL... i.e.

esbservices.mydomain.com/myproject/services/myservice?wsdl

However the WSDL document (accessed even through domain) contains imports to other WSDL documents with path of local network/computer.

<definitions targetNamespace="my-integration-composite"><import namespace="http://j2ee.netbeans.org/wsdl/my-integration-services/new-transactions" location="http://my-pc-name.com:9080/my-integration-composite-sun-http-binding/my-integration-services/channel/smsc/inbound/wsdl/new-transactions.wsdl">
    </import><import namespace="http://j2ee.netbeans.org/my/wsdl/my-transactions" location="http://my-pc-name.com:9080/my-integration-composite-sun-http-binding/my-integration-services/transaction/common/wsdl/my-transactions.wsdl">
    </import><import namespace="http://j2ee.netbeans.org/wsdl/my-integration-services/other-transactions" location="http://my-pc-name.com:9080/my-integration-composite-sun-http-binding/my-integration-services/channel/ivr/inbound/wsdl/other-transactions.wsdl">
    </import><portType name="dummyCasaPortType">
  </portType>

I want to get rid of this http://my-pc-name.com:9080/ and be able to use http://esbservices.mydomain.com/ instead. because when someone tries to generate web service client from other network, it fails.

Was it helpful?

Solution

In GlassFish ESB v2.2, as in GlassFish ESB v2.1 before it, the name of the host specified in the URL matters. One may get different artifacts generated when specifying “localhost” as the host name, different when specifying FQDN of the host and different when specifying an alias host name (alternative name to FQDN, perhaps specified in the “hosts” file. If the alias refers to 127.0.0.1 artifacts are not generated correctly.

The best policy is to use the FQDN of the host to which the service is deployed. This generates correct artifacts.

GlassFish ESB WS Security Chapter 5

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top