another way to get rid of this problem is to create an endorsed
directory under <JDK1.4.X>/jre/lib, and
copy <jwsdp.home>/jaxp/lib/* <JDK1.4.X>/jre/lib/endorsed
copy <jwsdp.home>/jaxp/lib/endorsed/* <JDK1.4.X>/jre/lib/endorsed
and restart your server.
thanks.
V B Kumar Jayanti wrote:
> Sels Wannes wrote:
>
>> We've decided to switch to JWSDP 1.6 and use the sample from there.
>>
>> I'm trying to deploy the simple sample, I've modified the
>> build.properties and tomcat-config.xml to reflect my file locations.
>> Security config is set to sign the response and require a signature
>> from client.
>>
>> However when trying to generate the war wscompile complains about a
>> method not found (java.lang.NoSuchMethodError:
>> javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;)
>> This is in jwsdp-1.6/jaxp/lib/jaxp-api.jar . WSCompile verbose output
>> shows this as endorsed, so I'm not really sure why it can't find the
>> proper class/jar.
>>
>>
>>
>> Any ideas?
>>
> you seem to have hit a bug which we have documented in our release
> notes :
> http://java.sun.com/webservices/docs/1.6/ReleaseNotes.html
>
> If you can switch over to JDK 1.5 then this problem will not occur.
> It will also imporve your performance a bit.
>
> Alternatively, here is what you need to do :
>
> When running XWS-Security samples under the following configuration,
> the classpath separator in the |tomcat-config.xml| file needs to be
> changed:
>
> * Windows Platform
> * JWSDP 1.6 installed on Tomcat container
> * Java SDK version 1.4.x
>
> Change the classpath separator on line number 3 of the file
> |<jwsdp.home>\xws-security\samples\buildconfig\tomcat-config.xml| from
> ":" to ";", as shown:
>
>Unix: <property name="java.endorsed.dir" value="${tomcat.home}/jaxp/lib/endorsed:${tomcat.home}/jaxp/lib/"/>
>Windows: <property name="java.endorsed.dir" value="${tomcat.home}/jaxp/lib/endorsed;${tomcat.home}/jaxp/lib/"/>
>
>thanks.
>
>
>>
>>
>>
>>
>> Kind regards,
>>
>>
>>
>> Wannes Sels
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> *From:* V B Kumar Jayanti [mailto:Vbkumar.Jayanti_at_Sun.COM]
>> *Sent:* dinsdag 5 juli 2005 10:27
>> *To:* users_at_jax-rpc.dev.java.net
>> *Subject:* Re: XWS problem
>>
>>
>>
>> Hi Wannes,
>>
>> The error message you are seeing in the response is because XWS (in
>> JWSDP 1.5) is unable to resolve the reference
>> <ds:Reference URI="#Body">
>>
>> According to the WSS specification, when trying to locate an element
>> referenced in a signature, the following attributes are considered:
>>
>> " Local ID attributes on XML Signature elements
>> " Local ID attributes on XML Encryption elements
>> " Global wsu:Id attributes (described below) on elements
>>
>> In your client request an Id attribute is being used to reference the
>> SOAP Body as opposed to a wsu:Id attribute.
>>
>> However, if you swtich over to JWSDP 1.6 which was released recently
>>
>> http://java.sun.com/webservices/jwsdp/index.jsp
>>
>> Then your client request should be accepted unmodified. Please try
>> it out and let us know.
>>
>> Thanks.
>>
>> Sels Wannes wrote:
>>
>> Hi all,
>>
>>
>>
>> We're trying to use a secured webservice with our own javascript
>> client. The service I got from here:
>> http://msdn.microsoft.com/architecture/default.aspx?pull=/library/en-us/dnbda/html/wssinteropjwsdp15.asp
>> . My security config for the service is as follows:
>>
>> <xwss:JAXRPCSecurity
>> xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
>> <http://java.sun.com/xml/ns/xwss/config>>
>>
>> <xwss:Service>
>>
>> <xwss:SecurityConfiguration dumpMessages="true">
>>
>> <xwss:RequireSignature/>
>>
>> </xwss:SecurityConfiguration>
>>
>> </xwss:Service>
>>
>> <xwss:SecurityEnvironmentHandler>
>>
>> com.sun.xml.wss.sample.SecurityEnvironmentHandler
>>
>> </xwss:SecurityEnvironmentHandler>
>>
>> </xwss:JAXRPCSecurity>
>>
>>
>>
>> We're using our own test certificates (see attachments) which I've
>> imported into catalina.home/xws-security/etc/server-truststore.jks .
>> The clients request looks like this:
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <SOAP-ENV:Envelope
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> <http://schemas.xmlsoap.org/soap/envelope/>
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> <http://schemas.xmlsoap.org/wsdl/soap/>
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>> <http://schemas.xmlsoap.org/soap/encoding/>
>> xmlns:tns="http://wss.samples.microsoft.com"
>> <http://wss.samples.microsoft.com>
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> <http://schemas.xmlsoap.org/wsdl/>
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> <http://www.w3.org/2001/XMLSchema>
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> <http://www.w3.org/2001/XMLSchema-instance>>
>>
>> <SOAP-ENV:Header>
>>
>> <wsse:Security
>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>> <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>>
>>
>> <ds:Signature
>> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
>> <http://www.w3.org/2000/09/xmldsig>>
>>
>> <ds:SignedInfo>
>>
>> <ds:CanonicalizationMethod
>> Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
>> <http://www.w3.org/TR/2001/REC-xml-c14n-20010315>/>
>>
>> <ds:SignatureMethod
>> Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
>> <http://www.w3.org/2000/09/xmldsig#rsa-sha1>/>
>>
>> <ds:Reference URI="#Body">
>>
>> <ds:DigestMethod
>> Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"
>> <http://www.w3.org/2000/09/xmldsig#sha1>/>
>>
>>
>> <ds:DigestValue>nAWqEctvN0YBK583AOEFhDKURnI=</ds:DigestValue>
>>
>> </ds:Reference>
>>
>> </ds:SignedInfo>
>>
>> <ds:SignatureValue>
>>
>>
>> jKg1zawmJSgM/i2xcuQ0uQDNB8g33mT1H/0CnaL0Kc8DV/k4YELmbuci7PdUBUxc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ly93czAzLWJwZWwuaWNvbm9zLmJlL0NlcnRFbnJvbGwva3plbi5jcmyGMGZpbGU6Ly9cXHdz
>>
>>
>> MDMtYnBlbC5pY29ub3MuYmVcQ2VydEVucm9sbFxremVuLmNybDCBsgYIKwYBBQUHAQEEgaUw
>>
>>
>> gaIwTgYIKwYBBQUHMAKGQmh0dHA6Ly93czAzLWJwZWwuaWNvbm9zLmJlL0NlcnRFbnJvbGwv
>>
>>
>> d3MwMy1icGVsLmljb25vcy5iZV9remVuLmNydDBQBggrBgEFBQcwAoZEZmlsZTovL1xcd3Mw
>>
>>
>> My1icGVsLmljb25vcy5iZVxDZXJ0RW5yb2xsXHdzMDMtYnBlbC5pY29ub3MuYmVfa3plbi5j
>>
>>
>> cnQwDQYJKoZIhvcNAQEFBQADgYEASh8D+AA2JxsN1TRnGK/BoHDKV5AW96NCksvKzeQcPL4t
>>
>>
>> KdRHhyiu9fCSSdON0O6Jq0qL416G+pXlkRc0xYNdIT1GZcdU2/QqHYBuSxjygovI00m7ynlH
>>
>> kzqHCkyWSiQYIS8ergfdH3AFHzdbLH4MGcDYvayXv3mQZqvPA7yRWw0=
>>
>> </X509Certificate>
>>
>> </X509Data>
>>
>> </ds:KeyInfo>
>>
>> </ds:Signature>
>>
>> </wsse:Security>
>>
>> </SOAP-ENV:Header>
>>
>> <SOAP-ENV:Body Id="Body">
>>
>> <submitOrder xmlns="http://wss.samples.microsoft.com"
>> <http://wss.samples.microsoft.com>>
>>
>> <OrderImpl_1 xmlns="">
>>
>> <creditCardExpM xsi:type="xsd:int">0</creditCardExpM>
>>
>> <creditCardExpY xsi:type="xsd:int">0</creditCardExpY>
>>
>> <creditCardNum xsi:type="xsd:string">bla</creditCardNum>
>>
>> <id xsi:type="xsd:long">0</id>
>>
>> </OrderImpl_1>
>>
>> </submitOrder>
>>
>> </SOAP-ENV:Body>
>>
>> </SOAP-ENV:Envelope>
>>
>>
>>
>> To which the server responds:
>>
>>
>>
>> INFO: ==== Response Start ====
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>> <http://schemas.xmlsoap.org/soap/envelope/>
>> xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
>> <http://schemas.xmlsoap.org/soap/encoding/>
>> xmlns:ns0="http://wss.samples.microsoft.com"
>> <http://wss.samples.microsoft.com>
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> <http://www.w3.org/2001/XMLSchema>
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> <http://www.w3.org/2001/XMLSchema-instance>>
>>
>> <env:Body>
>>
>> <env:Fault>
>>
>> <faultcode
>> xmlns:ans1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>> <http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd>>ans1:PolicyViolation</faultcode>
>>
>> <faultstring>Receiver requirement for signature target:
>> //*[local-name()='Body' and
>> namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/'] , has
>> not been met</faultstring>
>>
>> </env:Fault>
>>
>> </env:Body>
>>
>> </env:Envelope>
>>
>> ==== Response End ====
>>
>>
>>
>> I'm not really sure what the message means. Any thoughts?
>>
>>
>>
>>
>>
>> Kind regards,
>>
>>
>>
>> Wannes
>>
>>
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>
>>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net <mailto:users-unsubscribe_at_jax-rpc.dev.java.net>
>>
>>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net <mailto:users-help_at_jax-rpc.dev.java.net>
>>
>>
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>C:\jwsdp-1.6\xws-security\samples\simple>ant build-server
>>Buildfile: build.xml
>>
>>as8-check:
>>
>>ws-check:
>>
>>tc-check:
>>
>>compile-handler-code:
>> [echo] Compiling the handler source code
>> [javac] Compiling 1 source file to C:\jwsdp-1.6\xws-security\samples\simple\build\server\WEB-INF\classes
>> [javac] Compiling 1 source file to C:\jwsdp-1.6\xws-security\samples\simple\build\client\classes
>>
>>create-handler-jar:
>> [jar] Building jar: C:\jwsdp-1.6\xws-security\samples\simple\build\client\secenv-handler.jar
>>
>>prepare:
>>
>>gen-server:
>> [echo] Running wscompile....
>>[wscompile] command line: wscompile C:\jdk1.4.2_08\jre\bin\java.exe -Djava.endorsed.dirs=C:/jwsdp-1.6/jaxp/lib/endorsed:C:/jwsdp-1.6/jaxp/li
>>b/ -classpath C:\jwsdp-1.6\xws-security\samples\simple\build\server\WEB-INF\classes;C:\jwsdp-1.6\xws-security\lib\keyexport.jar;C:\jwsdp-1.6
>>\xws-security\lib\pkcs12import.jar;C:\jwsdp-1.6\xws-security\lib\security-plugin.jar;C:\jwsdp-1.6\xws-security\lib\wss-provider-update.jar;C
>>:\jwsdp-1.6\xws-security\lib\xws-saml.jar;C:\jwsdp-1.6\xws-security\lib\xws-security.jar;C:\jwsdp-1.6\xws-security\lib\xws-security_jaxrpc.j
>>ar;C:\jwsdp-1.6\xmldsig\lib\xmldsig.jar;C:\jwsdp-1.6\jwsdp-shared\lib\activation.jar;C:\jwsdp-1.6\jwsdp-shared\lib\commons-beanutils.jar;C:\
>>jwsdp-1.6\jwsdp-shared\lib\commons-collections.jar;C:\jwsdp-1.6\jwsdp-shared\lib\commons-digester.jar;C:\jwsdp-1.6\jwsdp-shared\lib\commons-
>>logging.jar;C:\jwsdp-1.6\jwsdp-shared\lib\jaas.jar;C:\jwsdp-1.6\jwsdp-shared\lib\jax-qname.jar;C:\jwsdp-1.6\jwsdp-shared\lib\jta-spec1_0_1.j
>>ar;C:\jwsdp-1.6\jwsdp-shared\lib\mail.jar;C:\jwsdp-1.6\jwsdp-shared\lib\namespace.jar;C:\jwsdp-1.6\jwsdp-shared\lib\relaxngDatatype.jar;C:\j
>>wsdp-1.6\jwsdp-shared\lib\xmlsec.jar;C:\jwsdp-1.6\jwsdp-shared\lib\xsdlib.jar;D:\tomcat\common\lib\ant-launcher.jar;D:\tomcat\common\lib\ant
>>.jar;D:\tomcat\common\lib\commons-collections-3.1.jar;D:\tomcat\common\lib\commons-dbcp-1.2.1.jar;D:\tomcat\common\lib\commons-el.jar;D:\tom
>>cat\common\lib\commons-pool-1.2.jar;D:\tomcat\common\lib\hsqldb-1.7.2.2.jar;D:\tomcat\common\lib\jasper-compiler.jar;D:\tomcat\common\lib\ja
>>sper-runtime.jar;D:\tomcat\common\lib\jsp-api.jar;D:\tomcat\common\lib\mysql-connector-java-3.0.9-stable-bin.jar;D:\tomcat\common\lib\naming
>>-common.jar;D:\tomcat\common\lib\naming-factory.jar;D:\tomcat\common\lib\naming-java.jar;D:\tomcat\common\lib\naming-resources.jar;D:\tomcat
>>\common\lib\servlet-api.jar;C:\jwsdp-1.6\sjsxp\lib\jsr173_api.jar;C:\jwsdp-1.6\sjsxp\lib\sjsxp.jar;C:\jwsdp-1.6\jaxrpc\lib\jaxrpc-api.jar;C:
>>\jwsdp-1.6\jaxrpc\lib\jaxrpc-impl.jar;C:\jwsdp-1.6\jaxrpc\lib\jaxrpc-spi.jar;C:\jwsdp-1.6\saaj\lib\saaj-api.jar;C:\jwsdp-1.6\saaj\lib\saaj-i
>>mpl.jar;C:\jwsdp-1.6\jaxp\lib\jaxp-api.jar;C:\jwsdp-1.6\jaxp\lib\endorsed\dom.jar;C:\jwsdp-1.6\jaxp\lib\endorsed\sax.jar;C:\jwsdp-1.6\jaxp\l
>>ib\endorsed\xalan.jar;C:\jwsdp-1.6\jaxp\lib\endorsed\xercesImpl.jar;C:\jdk1.4.2_08\lib\tools.jar com.sun.xml.rpc.tools.wscompile.Main -d C:\
>>jwsdp-1.6\xws-security\samples\simple\build\server\WEB-INF\classes -import -keep -model C:\jwsdp-1.6\xws-security\samples\simple\build\serve
>>r\WEB-INF\model.xml.gz -security C:\jwsdp-1.6\xws-security\samples\simple\config\sign-server.xml -verbose -Xprintstacktrace C:\jwsdp-1.6\xws
>>-security\samples\simple\etc\config.xml
>>[wscompile] java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
>>[wscompile] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
>>[wscompile] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
>>[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:314)
>>[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:225)
>>[wscompile] at com.sun.xml.rpc.wsdl.parser.WSDLParser.parse(WSDLParser.java:214)
>>[wscompile] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModelerBase.java:200)
>>[wscompile] at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
>>[wscompile] at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
>>[wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
>>[wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
>>[wscompile] at com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)
>>[wscompile] Exception in thread "main"
>>
>>BUILD FAILED
>>C:\jwsdp-1.6\xws-security\samples\simple\build.xml:119: wscompile failed
>>
>>Total time: 21 seconds
>>C:\jwsdp-1.6\xws-security\samples\simple>
>>
>>
>>------------------------------------------------------------------------
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>>
>>
>