Link to home
Start Free TrialLog in
Avatar of 3XLcom
3XLcom

asked on

javax.xml.ws.Holder<PmumService.StringValue>

How should i correct this code it does not accept javax
Thanks
public javax.xml.ws.Holder<PmumService.IntValue> Bilgi1() {
        QName qName = new QName("http://tempuri", "Test");
        StringValue sv = new IntValue() ;
        sv.setV(1);
        javax.xml.ws.Holder<PmumService.IntValue> el = new javax.xml.ws.Holder<PmumService.IntValue>(qName, StringValue.class, null, sv);
        return el;
   }
    public javax.xml.ws.Holder<PmumService.StringValue> Bilgi2() {
        QName qName = new QName("http://tempuri", "Test");
        StringValue sv = new StringValue() ;
        sv.setV("example");
        javax.xml.ws.Holder<PmumService.StringValue> el = new javax.xml.ws.Holder<PmumService.StringValue>(qName, StringValue.class, null, sv);
        return el;
   }

Open in new window

Avatar of Mick Barry
Mick Barry
Flag of Australia image

>         StringValue sv = new IntValue() ;


shouldn't that be IntValue
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 3XLcom
3XLcom

ASKER

:) i see it is
Sir points are yours

Should i want one last thing from you

the code given below is my connection class to this web service

services.getEVDServisSOAP11PortHttp().login(LMessage, new Main().Bilgi1(), new Main().Bilgi2());

This is wrong line in reality on .Net i call service like this :

        Dim msggg As New Pmum.LoginMessage()
        Dim ad As New Pmum.StringValue()
        ad.v = "deneme"
        msggg.UserName = ad
        Dim pass As New Pmum.StringValue()
        pass.v = "ddd"
        msggg.Password = pass
        Dim srv As New Pmum.EVDServis
        Response.Write(srv.login(msggg, strr).v.ToString())


So there is a difference in algorithm as you could see actually login library is not under this getEVDServisSOAP11PortHttp so where should be the error there is a dead endpoint address on there so this is real wsdl adress :

http://dgpys.teias.gov.tr/dgpys/services/EVDServis?wsdl

If you could check it i will be very glad for this i am trying to understand process
Thank you
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pmumjava;

import PmumService.IntValue;
import PmumService.StringValue;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.namespace.QName;
import javax.xml.ws.Holder;

/**
 *
 * @author Cahit
 */
public class Main {
    QName qName = new QName("http://tempuri", "Test");
    public void callWebService() {
        PmumService.EVDServis services = new PmumService.EVDServis();
        System.out.print(services.getWSDLDocumentLocation());
        PmumService.LoginMessage LMessage  = new PmumService.LoginMessage();
        LMessage.setUserName(new Main().getUserName());
        LMessage.setPassword(new Main().getPass());

        services.getEVDServisSOAP11PortHttp().login(LMessage, new Main().Bilgi1(), new Main().Bilgi2());

        System.out.print("Son : " + Bilgi2().value.getV());
    }
    public JAXBElement<PmumService.StringValue> getUserName() {
        StringValue sv = new StringValue() ;
        sv.setV("example");
        JAXBElement<StringValue> el = new JAXBElement<StringValue>(qName, StringValue.class, null, sv);
        return el;
   }
    public JAXBElement<PmumService.StringValue> getPass() {
        StringValue sv = new StringValue() ;
        sv.setV("example");
        JAXBElement<StringValue> el = new JAXBElement<StringValue>(qName, StringValue.class, null, sv);
        return el;
   }
    public javax.xml.ws.Holder<PmumService.IntValue> Bilgi1() {
        IntValue sv = new IntValue() ;
        sv.setV(1);
        Holder<PmumService.IntValue> el = new Holder<PmumService.IntValue>( sv);
        return el;
   }

    public javax.xml.ws.Holder<PmumService.StringValue> Bilgi2() {
        StringValue sv = new StringValue() ;
        sv.setV("example");
        Holder<PmumService.StringValue> el = new Holder<PmumService.StringValue>( sv);
        return el;
   }
    public static void main(String[] args) {
         System.out.print("Deneme");
         new Main().callWebService();
         System.out.print("Deneme2");
         
    }

}

Open in new window