web services - How to set up listener to salesforce outbound message in java using maven? -


i trying set salesforce outbound messaging listener in java. link followed set up, , works fine - https://developer.salesforce.com/page/creating_an_outbound_messaging_notification_service_with_eclipse_3.2

the article unfortunately never updated after 2012, , want set maven project obvious reasons -this run difficulties.

i looking right maven plugin reproduce whatever in link.the idea that, need have endpoint listener, such can receive soap message salesforce. me right now, have wsdl file (that salesforce), , starting point. endpoint included in wsdl. lot of research, decided use apache cxf maven plugin generate classes wsdl. have public endpoint available receive message.

however stuck , unsure how to proceed here. once classes, how configure endpoint listener? generated classes, there 1 interface notificationport , has method called when message hits endpoint. know need have class implements interface. how run , test service now?

this pom.xml

        <properties>     <project.build.sourceencoding>utf-8</project.build.sourceencoding>     <cxf.version>3.1.11</cxf.version>         <wsdl.generated.sources>${basedir}/src/main/java</wsdl.generated.sources>     <wsdl.location>${project.basedir}/src/main/resources/meta-inf/supplyorder.wsdl</wsdl.location>     </properties>        <dependency>         <groupid>org.apache.cxf</groupid>         <artifactid>cxf-codegen-plugin</artifactid>         <version>${cxf.version}</version>     </dependency>   </dependencies>      <build>     <plugins>         <plugin>             <groupid>org.apache.cxf</groupid>             <artifactid>cxf-codegen-plugin</artifactid>             <version>${cxf.version}</version>             <executions>                 <execution>                     <id>generate-sources</id>                     <phase>generate-sources</phase>                     <configuration>                         <sourceroot>${wsdl.generated.sources}</sourceroot>                         <wsdloptions>                             <wsdloption>                                 <wsdl>${wsdl.location}</wsdl>                             </wsdloption>                         </wsdloptions>                     </configuration>                     <goals>                         <goal>wsdl2java</goal>                     </goals>                 </execution>             </executions>         </plugin>     </plugins> </build> 

wsdl relevant parts

<!-- binding       need write service implements binding receive notifications  --> <binding name="notificationbinding" type="tns:notificationport">     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>      <operation name="notifications">         <soap:operation soapaction=""/>         <input>             <soap:body use="literal"/>         </input>         <output>              <soap:body use="literal"/>         </output>     </operation> </binding>  <!-- service endpoint --> <service name="notificationservice">     <documentation>notification service implementation</documentation>     <port binding="tns:notificationbinding" name="notification">         <soap:address location="http://localhost:8080/supplyorder/notification"/>     </port> </service> 

questions: 1. wrote custom class implements interface notificationsport. how run , test web service? can use run time environment run it? tomcat work?

  1. is there anyway can use spring set up? -as highly prefer use that.

if helps anyone, found tutorial have set up. follow is, , you're go. https://www.codenotfound.com/apache-cxf-spring-boot-soap-web-service-client-server-example.html


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -