Page 2 of 2 FirstFirst 12
Results 21 to 30 of 30
  1. #21
    madhu_sushmi is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default

    If i write a separate handler class which implements HandlerResolver , I dont know how it will be called automatically.


    If i use
    String wsdl = "https://pilot.xatanet.net/xatanetwebservice/conduitservice.asmx";
    ConduitServiceLocator service = new ConduitServiceLocator();

    ConduitServiceSoap port = service.getConduitServiceSoap();


    List credProviders = new ArrayList();

    CredentialProvider cp = new ClientUNTCredentialProvider(username, password);
    credProviders.add(cp);
    Stub stub = (Stub)port;
    stub._setProperty(WSSecurityContext.CREDENTIAL_PRO VIDER_LIST, credProviders);

    it is showing me Null pointer Exception. Is there any jar files missing. I have included all jar files for AXIS2 and wlfullclient.jar

  2. #22
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    364
    Rep Power
    5

    Default

    Hi mate,

    the most I can do right now is to send you this
    example of code as attach.

    There is a class thats creates SOAP header manually.

    Other class is just part of Stub and has method
    with example how to call that header creation from first class

    It's not exactly same security issue as your
    but i have nothing else that could maybe help.

    Hope it will help.


    cheers!
    Attached Files Attached Files

  3. #23
    madhu_sushmi is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default

    Hi
    Thanks a lot for your reply :)
    Infact i am awake waiting for your reply.
    Thanks a lot ..
    I could see you adding UserNameTokens in the that function.
    Then why do you say that it is not same security issue as mine ?

  4. #24
    madhu_sushmi is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default

    Even my header is something like this. I have only the skeleton of it now .

    <SOAP:Header>
    <wsse:Security >
    <wsse:UsernameToken>
    ..
    </wsse:UsernameToken>
    ...
    </wsse:Security>
    </SOAP:Header>

  5. #25
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    364
    Rep Power
    5

    Default

    Quote Originally Posted by madhu_sushmi View Post
    Then why do you say that it is not same security issue as mine ?
    Coz i have nothing to do with policy like you.
    I don't have idea what do you have to do with that policy

  6. #26
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    364
    Rep Power
    5

  7. #27
    madhu_sushmi is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default

    If i try to add header like this, it is showing me error like
    org.xml.sax.SAXException: No custom elements allowed at top level until after the <body> tag
    at org.apache.axis.message.EnvelopeBuilder.onStartChi ld(EnvelopeBuilder.java:157)
    at org.apache.axis.encoding.DeserializationContextImp l.startElement(DeserializationContextImpl.java:893 )
    at org.apache.xerces.parsers.SAXParser.startElement(S AXParser.java:1376)
    at org.apache.xerces.validators.common.XMLValidator.c allStartElement(XMLValidator.java:1284)
    at org.apache.xerces.framework.XMLDocumentScanner$Con tentDispatcher.dispatch(XMLDocumentScanner.java:11 71)
    at org.apache.xerces.framework.XMLDocumentScanner.par seSome(XMLDocumentScanner.java:381)
    at org.apache.xerces.framework.XMLParser.parse(XMLPar ser.java:1098)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImp l.parse(DeserializationContextImpl.java:232)
    at org.apache.axis.message.SOAPEnvelope.<init>(SOAPEn velope.java:146)
    at SoapHeaderCreator.createSoapHeader(SoapHeaderCreat or.java:337)


    at this line
    SOAPEnvelope soap = new SOAPEnvelope(ibis);

  8. #28
    madhu_sushmi is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default

    Please help me to solve this problem

  9. #29
    madhu_sushmi is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default

    Hi ,
    Thanks a lot for your guidance. I could solve it :)

  10. #30
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    364
    Rep Power
    5

    Default

    Oh great!

    But pls post idea how you gonna do it
    so everyone who is following this thread
    can end up with good conclusion.

    regards!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Using a Web Service
    By ragnor2004 in forum Advanced Java
    Replies: 12
    Last Post: 02-06-2010, 12:57 AM
  2. Web service
    By mousumidas in forum Advanced Java
    Replies: 3
    Last Post: 01-28-2010, 09:12 AM
  3. how to call service method inside another service
    By kirtichopra2003 in forum Web Frameworks
    Replies: 1
    Last Post: 10-24-2009, 02:19 AM
  4. serialize to web service?
    By theartz in forum Advanced Java
    Replies: 2
    Last Post: 08-16-2008, 01:39 AM
  5. Web Service from JSP
    By Eric in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-02-2007, 05:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •