9/1/2023 0 Comments Webservice soap apexStatic final String PASSWORD = "pass+securitytoken" Static final String USERNAME = "username" Set the SessionId in the request to MyWebservice.Create the connection with enterprise, and get SessionId.Generate proxy classes using WSC for dl (mywebservice.jar).Generate proxy classes using WSC for dl (enterprise.jar). ![]() I was trying to do something very similar to your question (but with the Enterprise API). ![]() I assume that happens because your AtlassianService wsdl, doesn't include the login method to authenticate in Salesforce, and then proxy classes generated by WSC cannot have the code to actually perform a login. tSessionHeader(config.getSessionId()) Īnybody has an idea why the first example fails? SoapConnection soap = Connector.newConnection(null, null) If I use the PartnerConnection to get a valid SessionID everything works fine: ConnectorConfig config = new ConnectorConfig() (soap.hello("WORLD")) // Invalid Session ( => SessionID is null) To generate the Client i just the way, which is described here: java –classpath pathToJAR/wsc-22.jar .dlc pathToWsdl/WsdlFilename pathToOutputJar/OutputJarFilenameĪccessing the Webservice: SoapConnection soap = "XXXX") WebService static String hello(String Name) My Webserce is quite Simple: global class AtlassianService ![]() I'm trying to establish a Connection to my Apex-Webservice but it fails everytime.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |