Webservice in IBM Designer - Connection refused - web-services

I was trying to implement an Web Service Consumer from a different tool in our company. So the admin of this tool gave me a WSDL-File to import into our IBM Notes database (Sadly I'm not allowed to post the WSDL file here).
Now, when I want to create the new Web Service
by clicking ok I get the following error message "The requested operation failed: Connection refused: connect":
So I checked if our firewall blocked this request from our Domino server to the Tool server, but there was no request at all. The firewall showed nothing, so it seemed, this request never got out from the Domino server.
Did anybody get a similar error or can tell me, where I can check why Domino seems to block this request?
We have other Webservices running, so it can't be a general issue.
Edit1: Imports done in the WSDL file
<wsdl:types>
<xsd:schema targetNamespace="http://Interflex.de/Imports">
<xsd:import schemaLocation="http://192.168.102.242:6042/InterflexServices/IF6040Service?xsd=xsd0" namespace="http://Interflex.de" />
<xsd:import schemaLocation="http://192.168.102.242:6042/InterflexServices/IF6040Service?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xsd:import schemaLocation="http://192.168.102.242:6042/InterflexServices/IF6040Service?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/Interflex.IF6040.ServiceLayer.PublishedServices" />
<xsd:import schemaLocation="http://192.168.102.242:6042/InterflexServices/IF6040Service?xsd=xsd3" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<xsd:import schemaLocation="http://192.168.102.242:6042/InterflexServices/IF6040Service?xsd=xsd4" namespace="http://schemas.datacontract.org/2004/07/Interflex.IF6040.ServiceLayer.PublishedServices.SharedDataContracts" />
<xsd:import schemaLocation="http://192.168.102.242:6042/InterflexServices/IF6040Service?xsd=xsd5" namespace="http://schemas.datacontract.org/2004/07/Interflex.IF6040.Modules.Recording.PersonEvents.Global.EventProcessing" />
</xsd:schema>
</wsdl:types>

Related

WSDL xsd import from https to http:443 when deployed

I have a legacy SOAP WS in my JAVA project (1.7) which is currently giving some trouble. In its WEB-INF/wsdl/*.wsdl file there is this block
<xsd:schema>
<xsd:import namespace="https://myUrl.com/" schemaLocation="myService_schema.xsd"/>
</xsd:schema>
right after its deployment, when i download its wsdl via wget I get the following
<xsd:schema xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="https://o2o-staging.beeweeb.com/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="https://myUrl.com/" schemaLocation="http://myUrl.com:443/service-ws/myService?xsd=myService_schema.xsd"/>
</xsd:schema>
as you can see the xsd import address https://myUrl.com becomes http://myUrl.com:443, thus making the service inaccessible as nginx complains with a 400 error: The plain HTTP request was sent to HTTPS port
I really did some searching and found no problem assimilated to this. Can somebody please explain to me what is going on, and how to possibly fix it? the namespace url https: //myUrl.com should really remain that way, and is it possible to avoi its becoming http: //myUrl.com:443 ?
My server is Jboss 7.1
For whom it might be helpful.
When a soap webservice is deployed, jboss re-processes whatever wsdl and xsd you have in your WEB-INF/wsdl. My problem was that in my standalone.xml I had an http connector, while I actually needed an https one.
so you need to
1) change your connector to https (or whatever it is you are yousing for your web-app
<connector name="http" protocol="HTTP/1.1" scheme="https" socket-binding="http"
secure="true" proxy-port="443"/>
2) add and explicit wsdl port in your standalone.xml
<subsystem xmlns="urn:jboss:domain:webservices:1.2">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>jbossws.undefined.host</wsdl-host>
<wsdl-port>443</wsdl-port>

Oracle.dataAccess.Client.OracleClientFactory error for a webService on VS

I'm working on a C# WebService on Visual Studio 2012 which use data from an oracle Database and convert them with the EntityManager of visual studio.
On my computer it works fine, but as soon as I publish it on a server IIS, I got this error :
System.Web.Services.Protocols.SoapException: The store provider
factory type 'Oracle.DataAccess.Client.OracleClientFactory' does not
implement the IServiceProvider interface. Use a store provider that
implements this interface.
It happens when I try to get a connection on my database with the Entity framework and I don't know how to look at this problem in order to fix it.
DATA
I work with Oracle.DataAccess v 4.112.3 and .NETFramework 4.5
this is part of my web.config with the connection string
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<connectionStrings>
<add name="EntitiesCCMX" connectionString="metadata=res://*/ModelCCMX.csdl|res://*/ModelCCMX.ssdl|res://*/ModelCCMX.msl;provider=Oracle.DataAccess.Client;provider connection string="data source=CCMX;password=rhcs;persist security info=True;user id=CCMX"" providerName="System.Data.EntityClient" />
<add name="HastusEntities" connectionString="metadata=res://*/ModelHASTUS.csdl|res://*/ModelHASTUS.ssdl|res://*/ModelHASTUS.msl;provider=Oracle.DataAccess.Client;provider connection string="data source=GIRO2010.WORLD;password=hastus2010;user id=HASTUS2010"" providerName="System.Data.EntityClient" />
</connectionStrings>
What I already did :
I allowed 32bit application on the server
I reinstalled oracle on my computer and on the server
I try to send the oracle.DataAccess.dll on the server
I configured the oranet which redirect on my database
If you need anything more, please ask. I am really stuck with this one...
EDIT :
Managed to "fix" it but I'm not sure why, I will post a response will all the things I done if it keep working for a day or two.
Anyways, for short,
- I add 8 dll (oci, ociw32, Oracle.DataAccess, oraocci11, oraocciei11, oraocciocu11, OraOps11w, System.Data.OracleClient)
- I changed this line in Machine.Config (Microsoft.NET\Framework\v4.0.30319\Config)
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
by this line (Version = 4.112.3.0)
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
And I installed Visual Studio professional 2012 on the server (And I think that this instalation moved some repertory or some paths)
I will be back when I"m sure.
EDIT2
Didn't work anymore without touching at anything. But it's another error now.
ORA-12154: TNS:could not resolve the connect identifier specified
Your first problem is stated at oracle's web site
http://www.oracle.com/technetwork/issue-archive/2011/11-sep/o51odt-453447.html
It's the oracle version, you need newer one.
The last error it's just a connection error. try to tnsping the database from the server, if it works check your connection string.

Creating wso2 esb proxy service on an endpoint which has references to XSD

I've created a pass through proxy service on top on a endpoint and selected Specify Source URL in publish wsdl options. The endpoint references to xsd's in the wsdl definition. The proxy web service generated fines, but when trying to load this web service from a client (SOAP UI), it throws an error because of the way the xsd is referenced in the proxy service wsdl URL.
Sample of Actual web service with an xsd definition
<types>
<xsd:schema>
<xsd:import namespace="http://service.example.com/" schemaLocation="http://172.16.91.82:7001/DemoService/DemoService?xsd=1"/>
</xsd:schema>
</types>
Sample of the proxy service with a reference to schema.
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xsd:import namespace="http://service.example.com/" schemaLocation="SecuredServiceProxy?xsd=http://172.16.91.82:7001/DemoService/DemoService?xsd=1"/>
</xsd:schema>
</wsdl:types>
The client has a problem loading the schema location (which of course looks invalid)
1) I'm looking at a way to get rid of this.
2) This proxy service is intended to hide the actual service from the end user. The way the xsd schema is listed in proxy service wsdl definition, is leaking the actual endpoint information to the end user. Is there a way to avoid the xsd url displayed in the generated wsdl definition of proxy service ?
Thanks.
So you mean to say that your endpoint is the URL and your publish wsdl is also url? you can try specifying your publish wsdl as inline and you can create a .xsd file in ESB_Home which should contain the contents of your xsd URL. And then you can refrence your .xsd file by changing the location from url to simply the name of the xsd file present in your ESB_Home directory in your inline wsdl as :
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xsd:import namespace="http://service.example.com/" schemaLocation="DemoService.xsd"/>
</xsd:schema>
</wsdl:types>
Hope this works for you
If you need to hide to the actual service details from the end user, you can avoid publishing the WSDL in WSO2 ESB.
Then you will be invoke the Proxy Service defined in the ESB.
I hope this helps.
Thanks!

Securing Web Service communication with SSL using CXF

I am trying to secure communications via SSL/TLS for one of our Web Service using CXF 2.2.5.
I am wondering how to update client and server Spring configuration file to activate this feature.
I found some information on CXF's website (CXF Wiki) for the client configuration, here is the given example:
<http:conduit name="{http://apache.org/hello_world}HelloWorld.http-conduit">
<http:tlsClientParameters>
<sec:keyManagers keyPassword="password">
<sec:keyStore type="JKS" password="password"
file="src/test/java/org/apache/cxf/systest/http/resources/Morpit.jks"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="password"
file="src/test/java/org/apache/cxf/systest/http/resources/Truststore.jks"/>
</sec:trustManagers>
<sec:cipherSuitesFilter>
<!-- these filters ensure that a ciphersuite with
export-suitable or null encryption is used,
but exclude anonymous Diffie-Hellman key change as
this is vulnerable to man-in-the-middle attacks -->
<sec:include>.*_EXPORT_.*</sec:include>
<sec:include>.*_EXPORT1024_.*</sec:include>
<sec:include>.*_WITH_DES_.*</sec:include>
<sec:include>.*_WITH_NULL_.*</sec:include>
<sec:exclude>.*_DH_anon_.*</sec:exclude>
</sec:cipherSuitesFilter>
</http:tlsClientParameters>
<http:authorization>
<sec:UserName>Betty</sec:UserName>
<sec:Password>password</sec:Password>
</http:authorization>
<http:client AutoRedirect="true" Connection="Keep-Alive"/>
</http:conduit>
Concerning this configuration, the
Concerning the server side configuration I am unable to launch the server properly, here is the configuration I have:
<http:destination name="{urn:ihe:iti:xds-b:2007}DocumentRepository_Port_Soap12.http-destination">
</http:destination>
<httpj:engine-factory>
<httpj:engine port="9043">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="changeit">
<sec:keyStore type="JKS" password="changeit" file="security/keystore.jks" />
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="changeit" file="security/cacerts.jks" />
</sec:trustManagers>
<sec:cipherSuitesFilter>
<!--
these filters ensure that a ciphersuite with export-suitable or null encryption is used, but exclude
anonymous Diffie-Hellman key change as this is vulnerable to man-in-the-middle attacks
-->
<sec:include>.*_EXPORT_.*</sec:include>
<sec:include>.*_EXPORT1024_.*</sec:include>
<sec:include>.*_WITH_DES_.*</sec:include>
<sec:include>.*_WITH_NULL_.*</sec:include>
<sec:exclude>.*_DH_anon_.*</sec:exclude>
</sec:cipherSuitesFilter>
<sec:clientAuthentication want="true" required="true" />
</httpj:tlsServerParameters>
</httpj:engine>
</httpj:engine-factory>
But when I run my application server (JOnas) with this configuration I have the following error message:
Line 20 in XML document from ServletContext resource [/WEB-INF/beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'httpj:engine-factory'.
Do you guys know how to solve this issue?
Thanks in advance,
It sounds like you are missing a namespace declaration or you have fat-fingered your XML. This is likely more of a Spring related issue than a CXF issue.
Check that the following items appear on your beans element where you declare httj:engine-factory:
<beans
...
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
...
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
...">
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
Check that the CXF Jetty Transport JAR is in your classpath at runtime.
If you add the declaration and the schema location to your context file in your IDE (at least in Eclipse with the Spring plug-ins and IDEA) you should get schema validation right in your IDE so you can easily find any mistakes you make and take advantage of auto-completion.

webservice using security UserNameToken

I am trying to resolve a problem we have using glassfish V2 to publish a simple web service using a plain UserNameToken for security reasons. Since we were using Netbeans 6.5 to archive this we were looking into this tutorial.
Therefore the following steps were done:
In our dev environment we installed the Sun Java(TM) System Access Manager and can administer this through the admin console as well as through the Netbeans IDE. All good. The example from the tutorial worked perfect so we thought we are in a good position to move on.
After changing the security options for our web service we published this on our test environment without any Netbeans installed.
After that the following steps were done:
deploying the service
configure the realm in Access Manager for the IP address
setup the expected user to access the web service.
When our partner is now accessing the web service the actual web service code is not accessed and we always find in the server logging that the security header was not understood.
This is the message we receive at the server:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-10034404">
<wsu:Created>2009-01-19T16:33:38.537Z</wsu:Created>
<wsu:Expires>2009-01-19T16:34:08.537Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-10034094">
<wsse:Username>myUser</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">myPasswd</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
<wsa:MessageID soapenv:mustUnderstand="0">uuid:ecc3b150-e646-11dd-96e5-9f80a576275b</wsa:MessageID>
<wsa:To soapenv:mustUnderstand="0">http://62.154.241.166:8080/HTNGService/WebServiceForTrustService</wsa:To>
<wsa:Action soapenv:mustUnderstand="0">http://webservice.trustinternational.com/ws/services/Htng2ReservationService</wsa:Action>
<wsa:From xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing" soapenv:mustUnderstand="0">
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
</soapenv:Header>
<soapenv:Body>
...
</soapenv:Body></soapenv:Envelope>
our wsit.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="WebServiceForTrustService" targetNamespace="http://wstrust/" xmlns:tns="http://wstrust/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp1="http://www.w3.org/ns/ws-policy" xmlns:fi="http://java.sun.com/xml/ns/wsit/2006/09/policy/fastinfoset/service" xmlns:tcp="http://java.sun.com/xml/ns/wsit/2006/09/policy/soaptcp/service"
>
<message name="otaHotelResNotif"/>
<message name="otaHotelResNotifResponse"/>
<portType name="WebServiceForTrust">
<operation name="otaHotelResNotif">
<input message="tns:otaHotelResNotif"/>
<output message="tns:otaHotelResNotifResponse"/>
</operation>
</portType>
<binding name="WebServiceForTrustPortBinding" type="tns:WebServiceForTrust">
<wsp:PolicyReference URI="#WebServiceForTrustPortBindingPolicy"/>
<operation name="otaHotelResNotif">
<input/>
<output/>
</operation>
</binding>
<service name="WebServiceForTrustService">
<port name="WebServiceForTrustPort" binding="tns:WebServiceForTrustPortBinding"/>
</service>
<wsp:Policy wsu:Id="WebServiceForTrustPortBindingPolicy">
<wsp:ExactlyOne>
<wsp:All/>
</wsp:ExactlyOne>
</wsp:Policy>
</definitions>
Does anyone has any idea what configuration might be missing here?
We also realised that in the IDE after turning the security (AM security) on there was a file created under configuration files/ amserver called amconfig.xml.
This file we can't find on the webserver after deploying the service nor in the *.war nor under addons/amserver or so.
The file internally looks like:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:AMConfig xmlns:ns2="http://identity.netbeans.org/access_manager_config_1_0">
<ProviderConfig type="WSP" name="WebServiceForTrustService">
<SecurityMechanism uri="urn:sun:wss:security:null:UserNameToken-Plain"/>
</ProviderConfig>
</ns2:AMConfig>
since the information is already in sun-web.xml which is published on the server I think that should not be the problem but might be helpful for you.
since we worked further on the above here a few new things even if it isn't solved.
The example tutorial was rebuild and deployed on the test-server. Client and Server Test app. Both are working fine when started locally on the test-server.
If we configure how ever a client from remote to use the same web-service with the same security information, we find the same error like with our other application.
Therefore I assume it has something to do with the configurations o Access Manager, but no idea which one.
I hope that helps anyone to help me.
Thanks!