function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CK_YoungCK_Young 

how can i use tools( WSDL2Java )for the mywsdl.wsdl to find many classes

for examle;
 
global class foo {
webservice string a;
webservice string b;
}

and then

global class my {
webservice static foo echoFoo(foo f) {
return f;
}
}
 
the WSDL for the ws class was included the definition of foo.
but   when I make the tools( WSDL2Java )to the ws.wsdl ,      foo.class is not appeared.
how can many classes  package into the same WSDL(same.wsdl)?
and then use the java-tools(WSDL2Java)  to the  WSDL(same.wsdl),and then i can find many classes just as api(Enterprise WSDL )?
 
for examle
 
class boy{
    string boymethod(){}
}
 
class girl{
string boymethod(){}
}
class friend{
string friendmethod(){}
}
 
how can i make the classes into the same wsdl,and then and then use the java-tools(WSDL2Java)  to the  WSDL(same.wsdl),i can find many classes (class boy,class girl,class friend).how can do it
SuperfellSuperfell
What soap tools are you using ?, this works for me with Axis 1.4


bigmac:apex simon$ java -cp "$AXIS_CP" org.apache.axis.wsdl.WSDL2Java ws.wsdl
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.

bigmac:apex simon$ cat com/sforce/soap/schemas/_class/foo/Foo.java
/**
* Foo.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/

package com.sforce.soap.schemas._class.foo;

public class Foo implements java.io.Serializable {
private java.lang.String a;

private java.lang.String b;

public Foo() {
}

public Foo(
java.lang.String a,
java.lang.String b) {
this.a = a;
this.b = b;
}
....
111111
I am CK_Young ,Thank you for your help!
 
i got the Foo.class in the folder「\com\sforce\soap\schemas\_class\s\foo」
111111
i find the foo.class ,but why i can't use the Binding.Foo(String ,String)?:smileywink:
 
why "  LoginResult loginResult = soapBinding.login(userName, password);" is right?
 
 
package com.sforce.soap.schemas._class.s.foo;
import java.rmi.RemoteException;
import javax.naming.Binding;
import javax.xml.rpc.ServiceException;
import org.apache.axis.AxisProperties;
import com.sforce.soap.enterprise.LoginResult;
import com.sforce.soap.enterprise.SforceServiceLocator;
import com.sforce.soap.enterprise.SoapBindingStub;
import com.sforce.soap.enterprise.fault.InvalidIdFault;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.enterprise.fault.UnexpectedErrorFault;
 
public class testFoo {

  
    private static String userName ="";
    private static String password = "";
  
  public static void main(String[] args) {
   FooServiceLocator helloDataSL = new FooServiceLocator();
       
        try {
         SessionHeader sh = new SessionHeader();
    
         FooBindingStub Binding = (FooBindingStub) helloDataSL.getfoo();
            Binding.setHeader(helloDataSL.getServiceName().getNamespaceURI(),
                                  "SessionHeader", doLogin(sh));
            
             System.out.println(Binding.Foo(String ,String));
       
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
private static SessionHeader doLogin(SessionHeader sessionHeader) {
......
}