Solved

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

Posted on 2010-09-06
3
1,328 Views
Last Modified: 2012-05-10
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

0
Comment
Question by:3XLcom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 33614073
>         StringValue sv = new IntValue() ;


shouldn't that be IntValue
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 33614076
>         javax.xml.ws.Holder el = new javax.xml.ws.Holder(qName, StringValue.class, null, sv);

and here
0
 

Author Comment

by:3XLcom
ID: 33614105
:) 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

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
login form jsp example 2 71
Eclipse Java import and method not resolved 4 128
What browser will run Java? 7 171
Is there a Google Voice API? 9 69
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question