Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7727415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:27:12+00:00 2026-06-01T05:27:12+00:00

I’m trying to create a JAX-WS webservice with security enabled. I followed this tutorial

  • 0

I’m trying to create a JAX-WS webservice with security enabled. I followed this
tutorial and done it with a previously built webservice of my own. It’s just a simple webservice that returns the current time. So the client is on a stand alone Java application and the client code goes as:

public class CallWS {
    public static void main(String[] args) {
        TimeService ts = new TimeService();
        Time time = ts.getTimePort();
        System.out.println(time.timeOfDay());
    }
}

but I’m getting the below exception:

SEVERE: WSSTUBE0023: Error in creating new instance of SecurityClientTube
java.lang.RuntimeException: WSSTUBE0016: TrustStore URL was obtained as NULL from ConfigAssertion.
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.populateTruststoreProps(SecurityTubeBase.java:1411)
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.populateConfigProperties(SecurityTubeBase.java:1314)
    at com.sun.xml.wss.jaxws.impl.SecurityClientTube.configureClientHandler(SecurityClientTube.java:779)
    at com.sun.xml.wss.jaxws.impl.SecurityClientTube.<init>(SecurityClientTube.java:170)
    at com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:227)
    at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:77)
    at com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:121)
    at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:224)
    at com.sun.xml.ws.client.Stub.<init>(Stub.java:201)
    at com.sun.xml.ws.client.Stub.<init>(Stub.java:174)
    at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:81)
    at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:602)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:344)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:308)
    at javax.xml.ws.Service.getPort(Service.java:99)
    at wsclient.TimeService.getTimePort(TimeService.java:72)
    at main.CallWS.main(CallWS.java:19)

Exception in thread "main" java.lang.RuntimeException: WSSTUBE0023: Error in creating new instance of SecurityClientTube
    at com.sun.xml.wss.jaxws.impl.SecurityClientTube.<init>(SecurityClientTube.java:175)
    at com.sun.xml.wss.provider.wsit.SecurityTubeFactory.createTube(SecurityTubeFactory.java:227)
    at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:77)
    at com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:121)
    at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:224)
    at com.sun.xml.ws.client.Stub.<init>(Stub.java:201)
    at com.sun.xml.ws.client.Stub.<init>(Stub.java:174)
    at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:81)
    at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:602)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:344)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:308)
    at javax.xml.ws.Service.getPort(Service.java:99)
    at wsclient.TimeService.getTimePort(TimeService.java:72)
    at main.CallWS.main(CallWS.java:19)
Caused by: java.lang.RuntimeException: WSSTUBE0016: TrustStore URL was obtained as NULL from ConfigAssertion.
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.populateTruststoreProps(SecurityTubeBase.java:1411)
    at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.populateConfigProperties(SecurityTubeBase.java:1314)
    at com.sun.xml.wss.jaxws.impl.SecurityClientTube.configureClientHandler(SecurityClientTube.java:779)
    at com.sun.xml.wss.jaxws.impl.SecurityClientTube.<init>(SecurityClientTube.java:170)
    ... 14 more
Java Result: 1

I used the same security mechanism as mention in the tutorial (Username Authentication with Symmetric Keys) and followed exactly the same steps both client and server side environment.

I’m using

  • Netbeans 7.0.1
  • Glassfish 3.1
  • Java EE 6
  • JDK 7
  • Metro 2.0 libraries

wsit-ws.Time

<?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="TimeService" targetNamespace="http%3A%2F%2Fns.soacookbook.com" xmlns:tns="http%3A%2F%2Fns.soacookbook.com" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sc="http://schemas.sun.com/2006/03/wss/server" xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy" xmlns:wsp1="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsaw="http://www.w3.org/2005/08/addressing" 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" xmlns:sp1="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" 
 >
    <message name="timeOfDay"/>
    <message name="timeOfDayResponse"/>
    <portType name="Time">
        <operation name="timeOfDay">
            <input message="tns:timeOfDay"/>
            <output message="tns:timeOfDayResponse"/>
        </operation>
    </portType>
    <binding name="TimePortBinding" type="tns:Time">
        <wsp1:PolicyReference URI="#TimePortBindingPolicy"/>
        <operation name="timeOfDay">
            <input>
                <wsp1:PolicyReference URI="#TimePortBinding_timeOfDay_Input_Policy"/>
            </input>
            <output>
                <wsp1:PolicyReference URI="#TimePortBinding_timeOfDay_Output_Policy"/>
            </output>
        </operation>
    </binding>
    <service name="TimeService">
        <port name="TimePort" binding="tns:TimePortBinding"/>
    </service>
    <wsp1:Policy wsu:Id="TimePortBindingPolicy">
        <wsp1:ExactlyOne>
            <wsp1:All>
                <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp1:Optional="false"/>
                <sp1:SymmetricBinding>
                    <wsp1:Policy>
                        <sp1:ProtectionToken>
                            <wsp1:Policy>
                                <sp1:X509Token sp1:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
                                    <wsp1:Policy>
                                        <sp1:WssX509V3Token10/>
                                        <sp1:RequireIssuerSerialReference/>
                                    </wsp1:Policy>
                                </sp1:X509Token>
                            </wsp1:Policy>
                        </sp1:ProtectionToken>
                        <sp1:Layout>
                            <wsp1:Policy>
                                <sp1:Strict/>
                            </wsp1:Policy>
                        </sp1:Layout>
                        <sp1:IncludeTimestamp/>
                        <sp1:OnlySignEntireHeadersAndBody/>
                        <sp1:AlgorithmSuite>
                            <wsp1:Policy>
                                <sp1:Basic128/>
                            </wsp1:Policy>
                        </sp1:AlgorithmSuite>
                    </wsp1:Policy>
                </sp1:SymmetricBinding>
                <sp1:Wss11>
                    <wsp1:Policy>
                        <sp1:MustSupportRefIssuerSerial/>
                        <sp1:MustSupportRefThumbprint/>
                        <sp1:MustSupportRefEncryptedKey/>
                    </wsp1:Policy>
                </sp1:Wss11>
                <sp1:SignedSupportingTokens>
                    <wsp1:Policy>
                        <sp1:UsernameToken sp1:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                            <wsp1:Policy>
                                <sp1:WssUsernameToken10/>
                            </wsp1:Policy>
                        </sp1:UsernameToken>
                    </wsp1:Policy>
                </sp1:SignedSupportingTokens>
                <sc:KeyStore wspp:visibility="private" location="/home/oshadha/.netbeans/7.0/config/GF3_113/domain1/config/keystore.jks" type="JKS" storepass="changeit" alias="xws-security-server"/>
            </wsp1:All>
        </wsp1:ExactlyOne>
    </wsp1:Policy>
    <wsp1:Policy wsu:Id="TimePortBinding_timeOfDay_Input_Policy">
        <wsp1:ExactlyOne>
            <wsp1:All>
                <sp1:EncryptedParts>
                    <sp1:Body/>
                </sp1:EncryptedParts>
                <sp1:SignedParts>
                    <sp1:Body/>
                    <sp1:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="AckRequested" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                    <sp1:Header Name="SequenceAcknowledgement" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                    <sp1:Header Name="Sequence" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                    <sp1:Header Name="CreateSequence" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                </sp1:SignedParts>
            </wsp1:All>
        </wsp1:ExactlyOne>
    </wsp1:Policy>
    <wsp1:Policy wsu:Id="TimePortBinding_timeOfDay_Output_Policy">
        <wsp1:ExactlyOne>
            <wsp1:All>
                <sp1:EncryptedParts>
                    <sp1:Body/>
                </sp1:EncryptedParts>
                <sp1:SignedParts>
                    <sp1:Body/>
                    <sp1:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
                    <sp1:Header Name="AckRequested" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                    <sp1:Header Name="SequenceAcknowledgement" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                    <sp1:Header Name="Sequence" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                    <sp1:Header Name="CreateSequence" Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                </sp1:SignedParts>
            </wsp1:All>
        </wsp1:ExactlyOne>
    </wsp1:Policy>
</definitions>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:27:14+00:00Added an answer on June 1, 2026 at 5:27 am

    When you are configuring certificates using Netbeans for webservice clients (as with development defaults) sometimes the correct configurations are not written to the configuration files. So in that case you have to manually add the correct configuration.

    In this scenario the missing case was the location to the keystore file within the client configuration. So you have to explicitly add the location to the wsit-client.xml or another configuration file it importing from.

    <sc:KeyStore wspp:visibility="private" location="/home/username/.netbeans/7.0/config/GF3_113/domain1/config/keystore.jks" type="JKS" storepass="changeit" alias="xws-security-server"/>
    

    This can be done either from the UI interface provided by Netbeans or you can always use a file editor. The location can be obtained from wsit-ws.[Servicename] from webservice implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.