OpenESB GlassFish - WSDL imports improper location URL. - web-services

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.

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

Related

Stub client generation Apache CXF

I am seeing one behavior while accessing one wsdl. I used Apache Axis 1.3 as well as JAX-WS wsimport tool to generate client stubs, it is successfully generating stubs.
But when I am using apache-cxf-2.7.18 and using wsdl2java command, it's not generating stubs, giving me error.
WSDL is on https. I added proxy in wsdl2java bat file as well. wsdl contains a which is also on https.
Error I am getting like:
enter image description here
It seems to that it's not able to include underlying wsdl.
Can anybody give me any pointer what I am doing wrong?
I believe, when I am doing any service publishing, it can not be client implementation specific like it is supported by Axis but not CXF. or I can do that? Is there any restriction that could be applied?
(Solution in comments)
The error log shows a connection error when downloading the WSDL, probably due to a misconfiguration of the proxy in wsdl2java when using a SSL connection through maven
Maven is not is not able to download imports using the proxy configuration, since you have downloaded the wsdl, you can also download all referenced url resources to local files and change <wsdl:import location= to use each local file. Use a relative path ./yourfile or a URL format file://path/to/the/file

Shibboleth bypass for IP range

I have Shibboleth configured on an IIS server and am using it protect a .NET application.
I need authenticated access for users accessing the application over the web and for that Shibboleth is working fine.
The application also hosts web services which need to be accessed by other applications in the same server and for that working with Shibboleth is a challenge since web service clients cannot deal with the log in page.
Is it possible to configure Shibboleth to ignore requests coming from the same server for example by checking the IP address?
It won't directly answer your question, but I can share a workaround I found and hope it can help with your problem too.
Define another website in IIS pointing to the same folder as the initial one, and make it only respond to a different domain (like something.local). Then in IP Address and Domain Restrictions, make sure only 127.0.0.1 is allowed to access it.
In C:\Windows\System32\drivers\etc open the file "hosts" in Notepad (running with Administrator privileges). Add the line "127.0.0.1 something.local" (no quotes; make sure the domain is the same one you defined before)
Now, make the webservices call the application by the new domain.

wildfly changes schemaLocation in wsdl to secure url on deploy

Good morning,
Have a strange problem and have no idea where I should change such behavior. Wildfly 8.2. changes schemaLocation in published wsdl to secure url on deploy. My service port bound to http://hostname:8080/, but schemaLocation changed to https://hostname:8443/service. And I could not find where I have to make changes. Any chance to rewrite schemaLocation to default http port (http://hostname:8080/service)? I use stanalone configuration.
Arman

Configuring WSDL Based Proxy in WSO2 version 4.6

I have down loaded WSO2 ESB Version 4.6 and started the server. Clicked on proxy service. There I have selected WSDL Proxy option. It is asking the following for creating proxy.
Proxy Service Name* OpportunityService
WSDL URI* https://crm-aufsn4x0ruf.oracleoutsourcing.com//opptyMgmtOpportunities/OpportunityService?WSDL
WSDL Service* https://crm-aufsn4x0ruf.oracleoutsourcing.com:443/opptyMgmtOpportunities/OpportunityService
WSDL Port* 443
I just want consume this external web service via ESB. So I dont want publish. Did not configure any publish related fields. Now When I click on create it throws exception "Failed to add proxy service: OpportunityService. Check whether the Proxy already exists
". But I am sure that there is no existed service with that. I have tried with different names but the error is same.
I suspect that may gave values wrong for fields WSDL Service and WSDL Port. If click on Test URI its giving success.Can any one please suggest where I am doing wrong.
Thanks&Regards,
Raghu
For wsdl service parameter you need to give the <wsdl:service name>which you can find in the particular wsdl itself. I dont think it will be a URI like you have mentioned above. Likewise for port you can find the <wsdl:port> parameter in the wsdl.

How do I bind web service to a particular glassfish port?

I have Glassfish 3.1.1 (Metro JAX-WS stack) installation with several http listeners in my domain's virtual server.
When I deploy my EAR, web application and soap services are all bound to all available http listeners whereas I want them to be held by different listeners, each having it's own performance and connection pool setup.
I believed that sun-web.xml should be responsible for that sort of binding but I haven't found any options of binding service to specific port or virtual server.
Any ideas?
One option is to use the deploy command with an accordingly set virtualservers commandline parameter... for reference see http://download.oracle.com/docs/cd/E18930_01/html/821-2433/deploy-1.html or page 262 etc. at http://download.oracle.com/docs/cd/E18930_01/pdf/821-2433.pdf
Another option:
Several config files have new names (for example glassfish-web.xml is the new name for sun-web.xml).
To bind your EAR to specific URI see esp. the web element and its sub-element like web-uri - for details and samples see
http://download.oracle.com/docs/cd/E18930_01/html/821-2417/beaqk.html#scrolltoc
http://download.oracle.com/docs/cd/E18930_01/html/821-2417/beaql.html
http://javahowto.blogspot.com/2010/10/glassfish-webxml-and-sun-webxml.html