OC4J web service client and Spring

Hello!
I'm trying to use the Web Service client mechanism of Spring 1.2.6 in conjunction with OC4J by subclassing org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean and using generated classes from soap-ui.
Problem is that I keep getting errors like this when starting the (embedded) OC4J:
org.springframework.beans.FatalBeanException: Could not instantiate class [at.sozvers.bva.shared.util.CommaSeparatedClassPathContext]; constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'zpvPartnerAdresseWebService' defined in class path resource [onlineContext.xml]: Initialization of bean failed; nested exception is oracle.j2ee.ws.client.ServiceExceptionImpl: service: {http://oasdev1.bva.sozvers.at:8192/zpvPartnerAdresse/}PartnerAdresse does not contain port: {http://oasdev1.bva.sozvers.at:8192/zpvPartnerAdresse/}PartnerAdresse
The WSDL:
<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://service.zpv.esb.bva.sozvers.at" xmlns:ns2="http://error.shared.bva.sozvers.at" xmlns:ns3="http://dto.zpv.esb.bva.sozvers.at" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://service.zpv.esb.bva.sozvers.at/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://service.zpv.esb.bva.sozvers.at/">
<wsdl:types>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.zpv.esb.bva.sozvers.at/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="lesen">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="ns1:PartnerAdresseServiceRequest"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="lesenResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns3:ZPVPartnerAdresseDTO"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="schreiben">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="in1" nillable="true" type="ns1:PartnerAdresseServiceRequest"/>
<xsd:element maxOccurs="1" minOccurs="1" name="in2" nillable="true" type="ns3:ArrayOfZPVAdresseDTO"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="schreibenResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns3:ZPVResponseDTO"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service.zpv.esb.bva.sozvers.at" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="PartnerAdresseServiceRequest">
<xsd:sequence>
<xsd:element minOccurs="0" name="bisDat" type="xsd:dateTime"/>
<xsd:element minOccurs="0" name="bkFachschluessel" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="bkInput" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="vonDat" type="xsd:dateTime"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://dto.zpv.esb.bva.sozvers.at" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="ZPVPartnerAdresseDTO">
<xsd:sequence>
<xsd:element minOccurs="0" name="exceptionDTO" nillable="true" type="ns2:ExceptionDTO"/>
<xsd:element minOccurs="0" name="responseDto" nillable="true" type="ns3:ZPVResponseDTO"/>
<xsd:element minOccurs="0" name="zpvAdresseDTOs" nillable="true" type="ns3:ArrayOfZPVAdresseDTO"/>
<xsd:element minOccurs="0" name="zpvPartnerStammdatenDTO" nillable="true" type="ns3:ZPVPartnerStammdatenDTO"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ZPVResponseDTO">
<xsd:sequence>
<xsd:element minOccurs="0" name="exceptionDTO" nillable="true" type="ns2:ExceptionDTO"/>
<xsd:element minOccurs="0" name="fehlerJN" nillable="true" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="zpvFehlerId" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="zpvMeldungstext" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfZPVAdresseDTO">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="ZPVAdresseDTO" nillable="true" type="ns3:ZPVAdresseDTO"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ZPVAdresseDTO">
<xsd:sequence>
<xsd:element minOccurs="0" name="abgabestelle" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="adresstyp" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="anschriftzusatz" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="beginn" type="xsd:dateTime"/>
<xsd:element minOccurs="0" name="beharrungsadresse" nillable="true" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="bundeslandKennzeichen" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="ende" type="xsd:dateTime"/>
<xsd:element minOccurs="0" name="exceptionDTO" nillable="true" type="ns2:ExceptionDTO"/>
<xsd:element minOccurs="0" name="gebrauchKurz" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="hausnummer" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="ort" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="plz" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="postfach" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="staatkennzeichen" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="staatname" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="stocktuernummer" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="strasse" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="updatecount" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" name="verwendungsartKurz" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="zpvAevnummer" nillable="true" type="xsd:long"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ZPVPartnerStammdatenDTO">
<xsd:sequence>
<xsd:element minOccurs="0" name="angehoeriger" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="bkFachschluesselAngabe" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="exceptionDTO" nillable="true" type="ns2:ExceptionDTO"/>
<xsd:element minOccurs="0" name="familienname" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="familiennameDiakritisch" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="geburtsDAT" type="xsd:dateTime"/>
<xsd:element minOccurs="0" name="geschlechtKZ" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="isoa3Staatsbuergerschaft" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="landesstellenKennzeichen" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" name="namensergaenzung" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="namenskorrektur" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="staatsbuergerschaftSonderformKZ" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="stornoJN" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="titelHintenKurz" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="titelVorneKurz" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="todesDAT" type="xsd:dateTime"/>
<xsd:element minOccurs="0" name="updatecount" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" name="versicherter" type="xsd:boolean"/>
<xsd:element minOccurs="0" name="vorname" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="vornameDiakritisch" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://error.shared.bva.sozvers.at" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="ExceptionDTO"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="schreibenResponse">
<wsdl:part element="tns:schreibenResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="lesenRequest">
<wsdl:part element="tns:lesen" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="lesenResponse">
<wsdl:part element="tns:lesenResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="schreibenRequest">
<wsdl:part element="tns:schreiben" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="PartnerAdresseServicePortType">
<wsdl:operation name="lesen">
<wsdl:input message="tns:lesenRequest" name="lesenRequest">
</wsdl:input>
<wsdl:output message="tns:lesenResponse" name="lesenResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="schreiben">
<wsdl:input message="tns:schreibenRequest" name="schreibenRequest">
</wsdl:input>
<wsdl:output message="tns:schreibenResponse" name="schreibenResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="zpvPartnerAdresseBinding" type="tns:PartnerAdresseServicePortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="lesen">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="lesenRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="lesenResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="schreiben">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="schreibenRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="schreibenResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PartnerAdresse">
<wsdl:port binding="tns:zpvPartnerAdresseBinding" name="zpvPartnerAdresse">
<wsdlsoap:address location="http://0.0.0.0:8192/zpvPartnerAdresse/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The Spring configuration of the WS- bean:
<bean id="zpvPartnerAdresseWebService" class="at.sozvers.bva.panda.m02.service.PartnerAdresseProxyFactoryBean">
<property name="serviceInterface">
<value>at.sozvers.bva.panda.m02.service.RemotePartnerAdresseBean</value>
</property>
<property name="wsdlDocumentUrl">
<value>http://oasdev1.bva.sozvers.at:8192/zpvPartnerAdresse/main.wsdl</value>
</property>
<property name="namespaceUri">
<value>http://oasdev1.bva.sozvers.at:8192/zpvPartnerAdresse/</value>
</property>
<property name="serviceName">
<value>PartnerAdresse</value>
</property>
<property name="portName">
<value>PartnerAdresse</value>
</property>
</bean>
Does anyone have ideas or experience using Spring 1.2.6 for web service clients with oc4j 10.1.3 ?
Thank you in advance
Stefan

I also tried to use "zpvPartnerAdresse" as portName, but this didn't change anything.
Stefan

Similar Messages

  • Web service client and SSL Certificate

    Hello, everyone,
    I have a problem that has really stumped me.
    I've written a web service client for a web service that has a digital certificate. This comes in the form of a .pfx file.
    When I try send a request to the web service, I get the following:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
         at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
         at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.tempuri.BasicHttpBinding_IExternalServiceStub.submitAchievementBatchJob(BasicHttpBinding_IExternalServiceStub.java:531)
         at uk.gov.qcf.lrs.api.services.IExternalServiceProxy.submitAchievementBatchJob(IExternalServiceProxy.java:56)
         at uk.org.aqa.main.Main.main(Main.java:111)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 24 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
         at java.security.cert.CertPathBuilder.build(Unknown Source)
         ... 30 more
         {http://xml.apache.org/axis/}hostname:WM8-319
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.tempuri.BasicHttpBinding_IExternalServiceStub.submitAchievementBatchJob(BasicHttpBinding_IExternalServiceStub.java:531)
         at uk.gov.qcf.lrs.api.services.IExternalServiceProxy.submitAchievementBatchJob(IExternalServiceProxy.java:56)
         at uk.org.aqa.main.Main.main(Main.java:111)
    Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
         at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
         at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
         ... 12 more
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 24 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
         at java.security.cert.CertPathBuilder.build(Unknown Source)
         ... 30 moreI've looked onliine to try to solve this issue, and it seemed that the answer was the add the certificate to the keystore. I had a lot of issues doing this, due to the certificate being a .pfx file. However, using the following, I was able to do it:
    keytool -importkeystore -srckeystore "sandpit.pfx" -destkeystore "%JAVA_HOME2%\lib\security\cacerts" -srcstoretype pkcs12 -deststoretype jks -srcstorepass password -deststorepass anotherpassword -vHowever, I am still getting the same error. This may be because this isn't the keystore used, but it is located in the area marked as being used in the build path.
    I then looked further, and found that I may need to add:
    System.setProperty("javax.net.ssl.trustStore","myKeystore");
    System.setProperty("javax.net.ssl.trustStorePassword","myPassword");altering where appropriate. But this didn't work, and I'm thinking that this would involve a lot more code than just those two lines.
    I'm just not sure what to do, and am hoping someone can help. I didn't think it would be too big an issue to ensure my program used the certificate, but it seems to be. I thought that once it was added to the keystore, that would be it, but it appears not.
    I'm sure this isn't a rare issue, but I just lack the knowledge to make any headway. Please can someone help or point me in the right direction?
    Thank you very much in advance.
    Robin

    Sorry to bother you again with my request but I would appreciate some help with my problems.
    Nobody his using some web services who requires protection ?
    Thanks a lot.

  • JAX-WS web service client and Windows integrated Security authentication

    I am currently developing a JAX-WS web service client running on WebLogic 10.3.2.0. The client is connecting to exchange web service running on IIS.
    Everything works well when EWS is configured with Http basic authentication.
    The problems started when I changed the autentication method on EWS from Http basic authentication to Windows integrated Security authentication.
    The client is then unable to authenticate to the web service. Every request made to EWS returns with the message : Invalid HTTP server response [401] - Unauthorized.
    I tried using an authenticator like this one:
    static class RetrieveWSDLAuthenticator extends Authenticator
    private String username, password;
    public RetrieveWSDLAuthenticator(String user, String pass)
    username = user;
    password = pass;
    @Override
    protected PasswordAuthentication getPasswordAuthentication()
    return new PasswordAuthentication(username, password.toCharArray());
    and setting it as the default authenticator :
    Authenticator.setDefault(new MyAuthenticator("username", "password"));
    but the method getPasswordAuthentication() was not even called.
    Is there a way to make a JAX-WS client works with Windows integrated Security ?

    WIS is not suppported on WLS JAX-WS. You'll need to use other authentication mechanisms such as http basic (which you tried already), or message-level security such as UNT, or SAML.
    Regards,
    Pyounguk

  • SAAJ (Web Service Client) and Integrated windows Authentication

    Hello
    I have build a web service client using SAAJ, the Web services is deployed on MS IIS. Every thing seems to work fine, The problem appears when I apply directory security on the Web Service Directory. When I apply Basic authentication SAAJ manages to send the user name and password and it goes fine, but when I apply Integrated Windows Authentication, I always get a response Access is Denied.
    I know we can authenticate the user credentials from NTLM from JAAS but here I am using a web services client.
    My Question is How can we pass the user credentials through a web service client to the IIS when the directory security is Windows Integrated Authentication?
    Any work around or the solution will be appreciated.
    Thanks :-)
    Syed Saulat

    Hi Gilles,
    Thank you very much for your answer. Actually, I think the problem is a little bit different. The kerberos server is not delivering a "grant" ticket to the client for the service provided by the VIP, because the CSS didn't register to the Active Directory, as a normal W2K web server would. The first thing the client does when he wants to access a web server behind the CSS is to ask the kerberos server for a "gtanting" ticket for that service. So the problem arise before the client sends any packet to the CSS (therefore I think it is more a Microsoft problem rather than a CSS problem).
    But for sure, other people have this environment I suppose...
    What is your opinion on this ?
    Yves

  • WSDL Web Services Client and EAR deploy problem

    Hi!
    I have allready posted this on "Web AS General", with no result.
    So I hope this forum is a better choise.
    Environment:
    SAP EP / SAP NW04 / SPS14
    NW DevStudio
    I just deployed an ear file (first time ...) with SDM.
    The ear file represents an auto generated web services client on basis of a WSDL file.
    (done from web services perspective in NWDS choosing "New Deployable Proxy Project")
    When running a test I get the following error:
    "Could not find portal application Unknown provider of external application: J2EE::sap.com/NWTPINWSClient"
    .. where NWTPINWSClient is the name of the EAR - file
    The test code contains this:
    The portalapp.xml has the following tag:
    <application-config>
    <property name="SharingReference" value="J2EE::sap.com/NWTPINWSClient">
    </property>
    </application-config>
    I'm new to this, so please feel free to consider newbie misstakes.
    BRGRDS
    Peter M

    Can you/anybody post solution. I have the same problem.
    Thanks
    Srinivas

  • Application Server 8.2 + Axis Web Service Client +Win Server 2003 Issue

    Hi everyone,
    I'm facing a weird problem the last couples of days and I'm getting bored of banging my head against the logs/screen, so please if you could help I'd really appreciate it.
    I'm working on a Sun Application Server 8.2 project that includes an axis web service client. I am using Netbeans 5 to do the writing plus I am on a Win XP platform.
    The developers of the web service I intend to absorb were kind enough to package the client into a jar so all I have to do is to import the client and the axis related jar files (axis, axis-ant etc.) in my project and my classpath.
    Everything is working perfect on my pc but when I deploy the project on my actual server the web service client is running forever, leaving my end users with a blank browser window that is also loading forever.
    The server OS is Win Server 2003 and is directly connected to a gateway - no proxies. Also my development pc and my server are running the same jre and have the exact server police settings; but Sun's Application Server is running on port 8080 on my pc whereas on my server it's running on port 80.
    Here's my server's log:
    [#|2008-04-14T21:50:01.795+0300|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=14;|StandardWrapperValve[obos]: Servlet.service() for servlet obos threw exception
    AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (0)null
    faultActor:
    faultNode:
    faultDetail:
         {}:return code: 0
         {http://xml.apache.org/axis/}HttpErrorCode:0
    (0)null
         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at uk.ac.ebi.ook.web.services.OntologyQuerySoapBindingStub.getOntologyNames(OntologyQuerySoapBindingStub.java:509)
         at org.dude.ols.client.obos.processRequest(obos.java:30)
         at org.dude.ols.client.obos.doGet(obos.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
    |#]
    Any ideas?

    Hi Paz,
    Thanks for taking the time :)
    To answer your questions:
    1. Has this WebServices ever worked or is this the first time?
    The web service is working perfectly fine on my working station, the problem appears only when I deploy it on my actual server, which means that the web service is working.
    2. What Apache Axis Version are you using?
    1.4
    3. What JRE version are you using?
    Both my development pc and my server run jre 1.5.0_14
    4. In the actual server environment, can you confirm all information are exactly same as DEV environment...
    Oh yes! Absolutely.
    My recent assumption is that some windows service might be needed to run the web service client and obviously I have no clue which one it might be.
    Just to make sure; is the security policy of my Application Server set correctly?
         permission java.lang.RuntimePermission     "getClassLoader";
         permission java.lang.RuntimePermission "createClassLoader";
         permission java.lang.RuntimePermission "loadLibrary.*";
         permission java.lang.RuntimePermission "queuePrintJob";
         permission java.net.SocketPermission "*", "connect,accept,resolve";
         permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
    // work-around for pointbase bug 4864405
    permission java.io.FilePermission "${com.sun.aas.instanceRoot}${/}lib${/}databases${/}-", "delete";
    permission java.io.FilePermission "${java.io.tmpdir}${/}-", "delete";
         permission java.util.PropertyPermission "*", "read,write";
         permission java.lang.RuntimePermission     "modifyThreadGroup";
    Again thanks for taking the time :)

  • Where should I place the web service client implementation?

    Hi,
    I created a web service client, and some java classes are automatically generated like stub, servicelocator, proxy...
    I wrote the client code to access and invoke a web service.Where should I place this code.
    Thanks.

    pls see Left outer join in Infoset

  • Problems with Web services client

    Hi all,
    I'm trying to build a Web Service Client with netbeans 6.5. I add the Web Service Refefrences by clicking right on my project/new/Web Service Client and giving it the url of the wsdl or the wsdl file itself. All work well, I use the web service without problems but then, after several successful try I don't know why, I get this kind of exception:
    Exception in thread "main" javax.xml.ws.WebServiceException: class net.stuff.webservice.webservices.Upload do not have a property of the name {www.stuff.net/WebService/WebServices}uploadReq
    I precise I don't modify the code that call the web service.
    To make it work again, I have to Clean & Build several time the project and/or Refresh tjh WebClient Reference, gain, without modifying the code.
    The Web Service producer runs on .net and doesn't seems to "move".
    Have you ever see this issue?
    Maybe this could help: I'm using JDK 5 with JAXB-WB
    Thanks

    Hello Eric:
    I have the same problem... but he Clean & Build thing didn't work :(...
    To make it work I call the Web Service from a java application and include the java application's jar in the libraries of the java web application.

  • Problem creating web service client using WSM Policies

    Hello everyone,
    I'm trying to make a simple java client to a Web Service secured using a WSM 11gR1 policy (from Soa Suite 11.1.1.2.0). The policy on the server side is oracle/wss11_x509_token_with_message_protection_service_policy which I attached via the Weblogic Admin Console. To implement the client I'm trying to follow the instructions from this documentation: http://download.oracle.com/docs/cd/E15523_01/web.1111/e13713/owsm_appendix.htm#WSSOV386 section "Policy Configuration Overrides for the Web Service Client" and also I'm using OEPE 11.1.1.3.0 (Eclipse 3.5.0) to develop the client. The only weblogic jar I've added to the build path is the weblogic.jar . Unfortunately, the oracle.wsm.security.util.SecurityConstants.ClientConstants interface (used in the example A-6) is not included in this jar and I have no idea what other libraries should I include in order to follow the example. I tried manualy adding other jars but without success. In fact I found one jar which includes this interface, the wsm-secpol.jar but it does not have the properties described in the documentation, so I guess it's not the right jar, and also I don't think this is the right procedure since there might be another dependent jars. So I would like to know what libraries exactly I should add to the build path (or some other procedure if you noticed I'm doing anything wrong)
    Thank you !

    Hi
    I am having the same problem almost where i wrote a client to comsume a JWS server in https. Where the server is setup to require a certificate to connect to.
    My code:
    public static void main(String[] args) {
    try {
    DataBaseSyncServerImpl port = new DataBaseSyncServerImplService().getDataBaseSyncServerImplPort();
    int number1 = 20;
    int number2 = 10;
    System.out.printf("Invoking divide method(%d, %d)\n", number1, number2);
    double result = port.divide(number1, number2);
    System.out.printf("The result of dividing %d and %d is %f.\n\n", number1, number2, result);
    when run this code throw
    run:
    [java] Invoking divide method(20, 10)
    [java] Exception in thread "main" javax.xml.ws.WebServiceException: HTTP transport error: javax.net.ssl.SSLHandshak
    eException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCert
    PathBuilderException: unable to find valid certification path to requested target
    Does any one know how can I solve this problem or how can I make the client be able to use self signed certificates. Any help is greatly apprecited. Thanks

  • Setting connect timeout and read timeout on a Web service Client

    How can I set timeout values for a SOAP Web service client?
    I don't want to set timeout values for the complete JVM, but on a call-by-call basis. I was looking for something like:
      SOAPConnection c = ....
      c.setTimeout(...);Anyone?

    Thanks again fsato4, but i still can not resolve my problem. I must use the java 1.2.2 and i think the package java.nio.charset is not supported. I have read documentation about the use of encodings but i can not understand clearly what is happening in my application. Let me explain what i am thinking and ask you some things.
    I send a message from the client in VB using soap toolkit, obviously in UTF-8 format. When the message is received in my Java Web service, Do i need to do something in order to my Java string understands the message?.
    What i am doing is to obtain the byte array with the following line:
    byte[] utf8Bytes = strXmlFile.getBytes("UTF8");
    And then i use the constructor of the string as follows:
    String ostr = new String (utf8Bytes,"UTF8"); I think that in this point i have my string in a valid representation for my server (Sun solaris) Rigth?. And finally i use my new string to pass that value to my function which expects a java.lang.String, but the result is that all the special characters are replaced.
    Just after of the new String line, i write my string to an Buffered Writer pointed to a FileOutputStream (just for Doublecheck) using the "ISO8859_1" encoding and for my surprise i can read very well that xml in my browser and the special characters are displayed in a correct way. Could you please explain me why?
    Thanks for your help.

  • Dynamic and embeddable web service client

    Hello,
    I want to write a web service client application that can run on JSE (not requiring JEE5, J2EE 1.4, an enterprise server or anything). This should be no problem with JSE6. However, I would like the client application to run on embedded devices (cell phones, PDA's etc.) as well. So I would like to know if web service clients are supported by the embedded JAVA runtimes in such devices. One additional requirement is that the webservices will only be accessible over SSL. So all clients will need support for SSL as well.
    The other problem (and probably the more difficult one) is this: Using the WDSL file, stubs for the client can be generated. However, the WDSL files (at least the ones generated by the SUN enterprise server) contain the IP-address of the server. In the final deployment of the system the IP-address of the server will be different from the one of the development system. Secondly, the same service might be deployed on different servers and needs to be accessible from the same client. So I'm looking for a mechanism to still use stubs generated from the WDSL file, but dynamically configure the IP address of the server to which the client should connect.
    Any help here is greathly appreciated.

    Hey Rishika,
    You don't need tomcat to run a client. A web service client does not need a container and can be run without it.
    Karan

  • OIM 11gR2 Request Validator Plugin and Axis based Web Service Client

    Hi,
    I am trying call a web service client generated using axis2 from a request validator plugin in OIM 11gR2 and I have all the axis related jar files under the plugin lib folder but it fails due to the axis reference issues.
    I tried putting the jar files under different locations like thirdparty folder, server lib etc. But it is giving issues every where. Please let me know if you have some solution.
    Thanks in advance,

    Haven't worked on this, but have you tried by putting the axis libraries inside the plugin lib folder when you are building up the plugin? Also you need to check asix2 compatibility with weblogic version with R2.
    -Bikash

  • Studio Creator and Web Service Clients

    Can somebody please explain to me or point me to some actual documentation on how this junk works?
    I have a web service client that was generated from a wsdl file being used by my studio creator project... the web service has changed and now i need to update/replace the client with a new one. It seems like no matter what I do it wants to tag a '3' onto the end of the name of the web service port and also build it into the package names - requirign me to go to all the places in my code that use this client and fix it to have a stupid 3 in it....
    Just replacing web service clients appears to be a huge ordeal involving removing the client libraries from the library folder, and even going into the build-impl.xml to remove references to the old client jars...
    I can't find any options to specify the web service client jar which would allow me to just overwrite the old ones instead of creating these new ones with archaic numbers (e.g. 1384793814) on the end of them...
    Is there an easy way to wipe clean or update a web service from an entire project without leaving these ridiculous references everywhere? When I try to replace the name personService3 with personService in the web service client generator tool it tells me the name is already in use but I can't for the life of me find it...
    can somebody shed some light on this for me? please help before i yank all my hair out...
    Thanks....
    Message was edited by:
    kregan77

    Please see the article I wrote called, "Web Service Consumption Security" at http://devservices.sun.com/premium/jscreator/standard/reference/tips/ws_consumption_security.html
    This will give you an idea of what is supported for the current version of Creator. Also, if you want some other feature supported, please submit a detailed use case to this forum.
    Thanks!
    -David

  • Breakpoints not working when debugging OC4J web service

    I am attempting to debug the PL/SQL web service autogenerated as part of the EMP_FETCHER tutorial example. My code has been compiled with debug information and the classes I wish to debug are not in my exclusions list.
    When using the embedded OC4J container, I've verified that it is starting up in debug mode in the log. Setting breakpoints in the Emp_Fetcher class on the line commencing
    __sJT_st = __sJT_ec.prepareOracleCall...
    however seems to have no effect. Running my web service client does not cause the web service to stop on the selected breakpoint.
    I've also tried remote debugging of the same web service on a separate database server. While I have been able to start OC4J on the server in debug mode, and connect to it from JDeveloper, setting of breakpoints seems to have no effect. I've monitored the TCP traffic on port 4000. It shows activity during the initial connection, but no traffic when I manipulate breakpoints in JDeveloper. I would have expected some traffic as breakpoints are added and removed.
    Any assistance would be appreciated.
    Regards
    Michael

    Hi Mithun Dha
    I am facing same problem !
    please let me know what is SICF user name and how to change it ?
    I am using MSS PCR application (MSS role, Personal Change Request which is standard application on portal and it calls BADI at backend, it was working fine till yday suddenly its not stopping at the ext breakpoint in BADI)
    thank you
    b

  • Exception Handling with OC4J Web Services

    Hi,
    I want to throw some custom exceptions from my web services, based upon my business logic. From the documents I came to know that I can use "javax.xml.rpc.soap.SOAPFaultException" for the same. Following is the sample web service code which I'm trying in my environment.
    import javax.ejb.Stateless;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.soap.SOAPFaultException;
    @WebService
    @Stateless
    public class TestService {
         @WebMethod
         public void greeting()
              throw new SOAPFaultException(new QName("uri", "local"),
         "My Fault String", "My Fault Actor", null);
    Deployment of the web service goes fine and on the invocation of the "greeting" operation the exception is being thrown. But the problem is that, the soap response, which my web service client receives is as of follows,
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://service.csm.nb.md.inglife.jp.co/">
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>Internal Server Error (Caught exception while handling request: oracle.oc4j.rmi.OracleRemoteException: javax.xml.rpc.soap.SOAPFaultException: My Fault String; nested exception is: javax.xml.rpc.soap.SOAPFaultException: My Fault String)</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    This means that OC4J again wraps the SOAPFaultException thrown by me. Is there any way by which I can avoid the further wrapping of my exceptions? If there is anything wrong in my approach please do let me know.
    Regards,
    Dipu

    This is one of the "classic" design problems in this kind of architecture. And, unfortunately, the answer is "it depends on how you think you need to handle it." And I'm sure there are plenty of "gurus" that will tell you one way or another is the only way to do it.
    I'll be more honest: I'll give you a couple of personal suggestions, based on experience in this architecture. These are suggestions - you may do with them what you will. I will not say this is the best, most correct, or even remotely relevant to what you're doing.
    If it's simple data validation for "typing" (e.g. String, number, Date, etc.), that is taken care of when you attempt to stuff in the information into the appropriate DTO. If it's more "sophisticated" than that (must be in a certain range, etc.), that particular checking should probably be delegated from your Controller to a helper class. That not only saves the "expense" of transmitting the information back and forth across the wire, it's "faster" to the end user so say "Ooopsie" by redirecting back to the form right then. Basically the same thing if the types are wrong.
    That only leaves the "big" problems in the business layer (EJBs), where you have to deal with concurrency, database failures, etc. Generally these kinds of exceptions are thrown back to to the Controller in one of two forms:
    1) a sublass of RuntimeException, which signals that some Very Bad Things have happened in your container. EJBException is one like that and you can see where it's being thrown from.
    2) a subclass of Exception, also called "application exceptions." They are usually something like a "duplicate record" or a validation-like error (which you mentioned) like a missing field. They're used as a signal to a failure in the logic, not the container. That way you have to decide at what layer of your architecture they should be handled and/or passed on to the next.

Maybe you are looking for

  • This is possible to hide the Close button in JFrame

    As title If can, please let me know how

  • Function module that can give balances by segment?

    Hi SAPs, I need help to get standard SAP function module that can give me GL balances by segment, period and fiscal year. I tried the existing function module for GL balances - BAPI_GET_ACCBALANCES - but it does not support segment. Please let me kno

  • DNS Server on Solaris 10

    Hi. I'm trying to install DNS in a Solaris 10, But there is some strange and is that the inetd file is so short, and in the rc2.d directory isn't the S72inetsvc that is the file that start | stop -TCP services. I copied that file from another server

  • Error with applets in Firefox

    Hello Whenever I open any page with a Java applet, I an error message pops up with java.lang.NullPointerException and Firefox more or less freezes. This has been occurring since I installed JDK (it worked fine before) and it doesn't happen with IE. D

  • Cross company subcontracting

    Hi gurus, I have to implement a cross company subcontracting scenario: company A (plant A) is the owner of raw materials that are sent to company B (plant B). Company B is a subcontractor: it produces semifinished products (different part number) tha