I have download the ‘Lead.wsdl’ file from my SOD account. With help of axis2 framework, I have converted it into java stub files. Now I am writing a client to insert the record into Lead objects, but I am getting following exception:
Exception: org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers at [row,col {unknown-source}]: [1,50] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java :90) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisO peration.java:353) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.j ava:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOper ation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at crmondemand.LeadStub.LeadInsert(LeadStub.java:1327) at crmondemand.TestClient.main(TestClient.java:71) Caused by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers at [row,col {unknown-source}]: [1,50] at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOA PModelBuilder.java:156) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPMo delBuilder.java:105) at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677) at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils. java:182) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java :112) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java :88) ... 6 more Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '"' (code 34) in DOCTYPE declaration; expected a space between public and system identifiers at [row,col {unknown-source}]: [1,50] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:623) at com.ctc.wstx.sr.BasicStreamReader.startDTD(BasicStreamReader.java:2482) at com.ctc.wstx.sr.BasicStreamReader.nextFromPrologBang(BasicStreamReader.java:239 8) at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2058) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069) at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:50 6) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161) ... 12 more
// 'tempUrl : contains Siebel On Demand url with jsessionId'
LeadStub stub = new LeadStub(tempUrl);
Lead lead = new Lead(); lead.setLeadFirstName(crmondemand.LeadStub.String50.Factory.fromString("yash"," urn:crmondemand/ws/lead/10/2004")); lead.setLeadLastName(crmondemand.LeadStub.String50.Factory.fromString("b","urn: crmondemand/ws/lead/10/2004"));
ListOfLead listOfLead = new ListOfLead(); listOfLead.setLead( new Lead[] {lead});
LeadWS_LeadInsert_Input reqDoc = new LeadWS_LeadInsert_Input();